You can use ${0} in oneline snippet

This commit is contained in:
Shougo Matsushita 2015-12-19 12:17:31 +09:00
parent 824c0fbe98
commit e3118e888f

View File

@ -347,10 +347,10 @@ neosnippet#anonymous({snippet})
Note: You can use this function with |map-<expr>|.
>
inoremap <silent> ((
\ <C-r>=neosnippet#anonymous('\left(${1}\right)${2}')<CR>
\ <C-r>=neosnippet#anonymous('\left(${1}\right)${0}')<CR>
" OR
inoremap <expr><silent> ((
\ neosnippet#anonymous('\left(${1}\right)${2}')
\ neosnippet#anonymous('\left(${1}\right)${0}')
<
*neosnippet#expand()*
neosnippet#expand({trigger})
@ -580,8 +580,6 @@ The structure of a placeholder can be:
placeholders in the snippet, it will repeat its content. $1 is
synchronized to ${1} and so on. ${0} will be the final jump
placeholder.
Note: You should not use ${0} for one line snippet.
It conflicts with nested snippet feature.
Example