Shougo / neosnippet.vim

neo-snippet plugin
Other
1.12k stars 108 forks source link

Regexp does not work #502

Closed savchenko closed 3 years ago

savchenko commented 3 years ago

Seems like the https://github.com/Shougo/neosnippet.vim/issues/190 is back:

snippet nn
abbr    name: Task snippet
regexp  \-\ name
options indent
    name: ${1:task}
    ${2:#:module}:
                ${3:#:parameter}: ${4}
            ${5:#:when:}

With listchars:

image

The snippet does not expand no matter where I type - name. I can call it only via nn. Have tried numerous variations of the same regexp (e.g. \s instead of \) but all in vain.

Had to use hard Tab as otherwise all lines were squashed to the beginning of the line.

Shougo commented 3 years ago

Please read the documentation. It must be quoted like this:

regexp  '- name'

And the regexp feature is not for auto expand. It is used for manual expand. The (pattern matched) auto expand is not implemented in neosnippet.