What's the problem with my snippet?


#1
'.source.python':
    'Docstring Module':
        'prefix': 'dom'
            'body': """
                '''
                |   ${1:resumo}
                |
                |   <Classes>
                |       ${2:classes}
                |
                |   <Exceções>
                |       ${3:exceções}
                |
                |   <Funções>
                |       ${4:funções}
                '''
                $0
            """

    'Docstring Class':
        'prefix': 'doc'
            'body': """
                '''
                |   ${1:resumo}
                |
                |   Base:   ${2:object}
                |
                |   <Atributos>
                |        ${3:atributos}
                |
                |   <Metodos>
                |        ${4:metodos}
                |
                |   <AtributosClasse>
                |        ${5:atributos_de_classe}
                '''
                $0
            """

    'Docstring Package':
        'prefix': 'dop'
            'body': """
                '''
                |   ${1:resumo}
                |
                |   <Modulos>
                |       ${2:modulos}
                |
                |   <Pacotes>
                |       ${3:pacotes}
                '''
                $0
            """

    'Docstring Function':
        'prefix': 'dof'
            'body': """
                '''
                |   ${1:resumo}
                |
                |   <Argumentos>
                |       ${2:argumentos}
                |
                |   <Retorno>
                |       ${3:retorno}
                |
                |   <Exceções>
                |       ${4:esceções}
                '''
                $0
            """

#2

I don’t know, what sort of issue are you having with your multiple snippets?


#3


#4

Have you tried commenting out parts to see if you can narrow it down?


#5

Apparently it was a indentation problem. There aren’t more errors, but it does not work. When the prefix is triggered, nothing happens.

'source.python':
  'Docstring Package':
    prefix: 'dop'
    body: '''
    """
    |   ${1:resumo}
    |
    |   <Modulos>
    |       ${2:modulos}
    |
    |   <Pacotes>
    |       ${3:pacotes}
    """
    '''
  'Docstring Module':
    prefix: 'dom'
    body: '''
    """
    |   ${1:resumo}
    |
    |   <Classes>
    |       ${2:classes}
    |
    |   <Exceções>
    |       ${3:exceções}
    |
    |   <Funções>
    |       ${4:funções}
    """
    '''
  'Docstring Class':
    prefix: 'doc'
    body: '''
    """
    |   ${1:resumo}
    |
    |   Base:   ${2:object}
    |
    |   <Atributos>
    |        ${3:atributos}
    |
    |   <Metodos>
    |        ${4:metodos}
    |
    |   <AtributosClasse>
    |        ${5:atributos_de_classe}
    """
    '''
  'Docstring Function':
    prefix: 'dof'
    body: '''
    """
    |   ${1:resumo}
    |
    |   <Argumentos>
    |       ${2:argumentos}
    |
    |   <Retorno>
    |       ${3:retorno}
    |
    |   <Exceções>
    |       ${4:esceções}
    """
    '''

#6

In between the two you took out the leading period on .source.python, it needs to be there.


#7

Did not understand.

Either way, I allow even just one, is not yet functioning.

'source.python':
  'Docstring Package':
    'prefix': 'docp'
    'body': '''
    """
    |   ${1:resumo}
    |
    |   <Modulos>
    |       ${2:modulos}
    |
    |   <Pacotes>
    |       ${3:pacotes}
    """
    '''

#8

Change the first line to:

'.source.python':