Merge pull request #80 from cpfaff/doc_improvement
improves the documentation
This commit is contained in:
commit
595f9e6e5a
@ -340,7 +340,7 @@ Example:
|
|||||||
snippet [name]
|
snippet [name]
|
||||||
abbr [abbreviation]
|
abbr [abbreviation]
|
||||||
alias [aliases]
|
alias [aliases]
|
||||||
prev_word '^'
|
options [options]
|
||||||
if ${1:condition}
|
if ${1:condition}
|
||||||
${2}
|
${2}
|
||||||
endif
|
endif
|
||||||
@ -370,11 +370,36 @@ Snippet Keywords:
|
|||||||
alias hoge hogera hogehoge
|
alias hoge hogera hogehoge
|
||||||
<
|
<
|
||||||
|
|
||||||
- prev_word [definition] (optional)
|
- options [options] (optional)
|
||||||
|
|
||||||
In the next line, here already starts the snippet which gets expanded. After
|
Options influece the snippet behavior. The possible options are:
|
||||||
snippet expansion you can jump to the placeholders and replace them with desired
|
|
||||||
text.
|
+ word This snippet expands by a word boundary. Note: To complete
|
||||||
|
the trigger in snippets_complete, it must be word(digits or
|
||||||
|
alphabet characters or "_") characters.
|
||||||
|
|
||||||
|
>
|
||||||
|
snippet date
|
||||||
|
options word
|
||||||
|
`strftime("%d %b %Y")`
|
||||||
|
<
|
||||||
|
|
||||||
|
+ head This snippet expands on the beginnign of a line only.
|
||||||
|
Note: This is the same as "prev_word '^'" which is still
|
||||||
|
there for backwards compatibility.
|
||||||
|
|
||||||
|
>
|
||||||
|
snippet if
|
||||||
|
if ${1:condition}
|
||||||
|
${2}
|
||||||
|
endif
|
||||||
|
<
|
||||||
|
|
||||||
|
+ indent Neosnippet indents the snippet after expansion to the same
|
||||||
|
column as the line above.
|
||||||
|
|
||||||
|
Below the keywords starts the snippet which gets expanded. After the snippet
|
||||||
|
expansion you can jump to the placeholders and replace them with desired text.
|
||||||
|
|
||||||
The structure of a placeholder can be:
|
The structure of a placeholder can be:
|
||||||
|
|
||||||
@ -448,11 +473,11 @@ The structure of a placeholder can be:
|
|||||||
|
|
||||||
- $number
|
- $number
|
||||||
|
|
||||||
This is the synchronized placeholder. Sometimes it is required to repat a value in
|
This is a synchronized placeholder. Sometimes it is required to repat a value
|
||||||
several places inside a snippet. If you set the number of this placeholder
|
in several places inside a snippet. If you set the number of this placeholder
|
||||||
to the same number as one of the other placeholders in the snippet it will
|
to the same number as one of the other placeholders in the snippet it will
|
||||||
repeat its content if you insert something. $1 is synchronized to ${1} and
|
repeat its content. $1 is synchronized to ${1} and so on. $0 will be the
|
||||||
so on. $0 will be the final jump placeholder.
|
final jump placeholder.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
|
|
||||||
@ -558,20 +583,6 @@ languages' indent files can not work very well (e.g.: PHP, Python).
|
|||||||
${2:// code...}
|
${2:// code...}
|
||||||
}
|
}
|
||||||
<
|
<
|
||||||
SNIPPET SYNTAX OPTIONS *neosnippet-snippet-syntax-options*
|
|
||||||
|
|
||||||
"options head" means this snippet is enabled only in line head.
|
|
||||||
Note: prev_word '^' is duplicated keyword.
|
|
||||||
|
|
||||||
"options word" means this snippet is expanded by word boundary.
|
|
||||||
Note: To complete the trigger in snippets_complete, it must be word(digits or
|
|
||||||
alphabet characters or "_") characters.
|
|
||||||
>
|
|
||||||
snippet date
|
|
||||||
options word
|
|
||||||
`strftime("%d %b %Y")`
|
|
||||||
<
|
|
||||||
"options indent" means neosnippet indents in expanded line.
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
UNITE SOURCES *neosnippet-unite-sources*
|
UNITE SOURCES *neosnippet-unite-sources*
|
||||||
|
Loading…
Reference in New Issue
Block a user