Merge pull request #1712 from hannonhill/velocity-snippets
Add snippets for common Velocity directives
This commit is contained in:
commit
84bc9b25de
1 changed files with 28 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
# macro
|
||||
snippet #macro
|
||||
#macro ( ${1:macroName} ${2:\$var1, [\$var2, ...]} )
|
||||
${3:## macro code}
|
||||
#end
|
||||
# foreach
|
||||
snippet #foreach
|
||||
#foreach ( ${1:\$item} in ${2:\$collection} )
|
||||
${3:## foreach code}
|
||||
#end
|
||||
# if
|
||||
snippet #if
|
||||
#if ( ${1:true} )
|
||||
${0}
|
||||
#end
|
||||
# if ... else
|
||||
snippet #ife
|
||||
#if ( ${1:true} )
|
||||
${2}
|
||||
#else
|
||||
${0}
|
||||
#end
|
||||
#import
|
||||
snippet #import
|
||||
#import ( "${1:path/to/velocity/format}" )
|
||||
# set
|
||||
snippet #set
|
||||
#set ( $${1:var} = ${0} )
|
||||
Loading…
Add table
Add a link
Reference in a new issue