2012-02-02 04:33:35 +00:00
|
|
|
snippet if
|
|
|
|
abbr if endif
|
|
|
|
prev_word '^'
|
|
|
|
if ${1:condition}
|
|
|
|
${0}
|
|
|
|
endif
|
|
|
|
|
|
|
|
snippet elseif
|
|
|
|
prev_word '^'
|
|
|
|
else if ${1:/* condition */}
|
|
|
|
${0}
|
|
|
|
|
|
|
|
snippet ifelse
|
|
|
|
abbr if else endif
|
|
|
|
prev_word '^'
|
|
|
|
if ${1:condition}
|
|
|
|
${2}
|
|
|
|
else
|
2012-10-04 08:51:15 +00:00
|
|
|
${3}
|
2012-02-02 04:33:35 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
snippet for
|
|
|
|
abbr for in endfor
|
|
|
|
prev_word '^'
|
|
|
|
for ${1:var} in ${2:list}
|
|
|
|
${0}
|
|
|
|
endfor
|
|
|
|
|
|
|
|
snippet while
|
|
|
|
abbr while endwhile
|
|
|
|
prev_word '^'
|
|
|
|
while ${1:condition}
|
|
|
|
${0}
|
|
|
|
endwhile
|
|
|
|
|
|
|
|
snippet function
|
|
|
|
abbr func endfunc
|
|
|
|
alias func
|
|
|
|
prev_word '^'
|
|
|
|
function! ${1:func_name}(${2})
|
|
|
|
${0}
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
snippet try
|
|
|
|
abbr try endtry
|
|
|
|
prev_word '^'
|
|
|
|
try
|
|
|
|
${1}
|
|
|
|
catch /${2:pattern}/
|
|
|
|
${3}
|
|
|
|
endtry
|
|
|
|
|
|
|
|
snippet log
|
|
|
|
prev_word '^'
|
|
|
|
echomsg string(${1})
|
|
|
|
|
|
|
|
snippet command
|
|
|
|
abbr command call function
|
|
|
|
prev_word '^'
|
|
|
|
command! ${1:command_name} call ${2:func_name}
|
|
|
|
|
|
|
|
snippet customlist
|
|
|
|
abbr customlist complete function
|
|
|
|
prev_word '^'
|
|
|
|
function! ${1:func_name}(arglead, cmdline, cursorpos)
|
|
|
|
return filter(${2:list}, 'stridx(v:val, a:arglead) == 0')
|
|
|
|
endfunction
|