- Improved documentation.
This commit is contained in:
parent
16762dfe1d
commit
de6dd9aae2
@ -50,6 +50,10 @@ prev_word '^'
|
|||||||
${3}
|
${3}
|
||||||
endtry
|
endtry
|
||||||
|
|
||||||
|
snippet catch
|
||||||
|
prev_word '^'
|
||||||
|
catch ${1:/${2:pattern: empty, E484, Vim(cmdname):{errmsg\\}\}/}
|
||||||
|
|
||||||
snippet log
|
snippet log
|
||||||
prev_word '^'
|
prev_word '^'
|
||||||
echomsg string(${1})
|
echomsg string(${1})
|
||||||
|
@ -296,7 +296,7 @@ Example:
|
|||||||
snippet if
|
snippet if
|
||||||
abbr if endif
|
abbr if endif
|
||||||
prev_word '^'
|
prev_word '^'
|
||||||
if $<1:condition>
|
if ${1:condition}
|
||||||
${2}
|
${2}
|
||||||
endif
|
endif
|
||||||
<
|
<
|
||||||
@ -340,7 +340,7 @@ snippet feature, you can define below mappings in your .vimrc:
|
|||||||
smap <C-l> <Plug>(neosnippet_expand_or_jump)
|
smap <C-l> <Plug>(neosnippet_expand_or_jump)
|
||||||
<
|
<
|
||||||
|
|
||||||
Placeholder feature is available.
|
Placeholder feature is available. The string after ":" is default value.
|
||||||
>
|
>
|
||||||
snippet if
|
snippet if
|
||||||
abbr if endif
|
abbr if endif
|
||||||
@ -349,8 +349,13 @@ Placeholder feature is available.
|
|||||||
${2}
|
${2}
|
||||||
endif
|
endif
|
||||||
<
|
<
|
||||||
'_' snippet feature is supported. '_' snippet is loaded in all filetypes.
|
Note: To contain "}" character in default value, you must escape "}".
|
||||||
And neosnippet can load snipMate snippets.
|
>
|
||||||
|
snippet test
|
||||||
|
${1:escape \} value}
|
||||||
|
<
|
||||||
|
'_' (global) snippet feature is supported. '_' snippet is loaded in all
|
||||||
|
filetypes. And neosnippet can load snipMate snippets.
|
||||||
|
|
||||||
Alias feature is supported. Separator is ' ' or ','.
|
Alias feature is supported. Separator is ' ' or ','.
|
||||||
>
|
>
|
||||||
@ -377,11 +382,21 @@ You choose snippet <C-n> or <C-p> and expand it with
|
|||||||
|<Plug>(neosnippet_expand_or_jump)| key-mappings.
|
|<Plug>(neosnippet_expand_or_jump)| key-mappings.
|
||||||
|
|
||||||
Nested placeholder feature is supported.
|
Nested placeholder feature is supported.
|
||||||
But must escape inner '}'. '\' is eacape sequence.
|
But must escape inner "}". "\" is eacape sequence.
|
||||||
>
|
>
|
||||||
snippet div
|
snippet div
|
||||||
<div ${1:id="${2:someid\}"}>${3}</div>${4}
|
<div ${1:id="${2:someid\}"}>${3}</div>${4}
|
||||||
<
|
<
|
||||||
|
In following snippet, you must escape "}" twice.
|
||||||
|
>
|
||||||
|
snippet catch
|
||||||
|
prev_word '^'
|
||||||
|
catch ${1:/${2:pattern: empty, E484, Vim(cmdname):{errmsg\\}\}/}
|
||||||
|
<
|
||||||
|
Because ${1:} substitutes the pattern to "/${2:pattern: empty, E484,
|
||||||
|
Vim(cmdname):{errmsg\}}" and ${2:} substitutes the pattern to "pattern:
|
||||||
|
empty, E484, Vim(cmdname):{errmsg}"
|
||||||
|
|
||||||
If you use hard tab for indentation in snippet file, neosnippet will use
|
If you use hard tab for indentation in snippet file, neosnippet will use
|
||||||
'shiftwidth' instead of Vim indent plugin. This feature is useful while some
|
'shiftwidth' instead of Vim indent plugin. This feature is useful while some
|
||||||
languages' indent files can not work very well (e.g.: PHP, Python).
|
languages' indent files can not work very well (e.g.: PHP, Python).
|
||||||
@ -417,6 +432,7 @@ CHANGELOG *neosnippet-changelog*
|
|||||||
|
|
||||||
2012-10-19
|
2012-10-19
|
||||||
- Fixed syntax highlight.
|
- Fixed syntax highlight.
|
||||||
|
- Improved documentation.
|
||||||
|
|
||||||
2012-10-18
|
2012-10-18
|
||||||
- Fixed s:get_sources_list().
|
- Fixed s:get_sources_list().
|
||||||
|
Loading…
Reference in New Issue
Block a user