neosnippet.vim/autoload/neosnippet/snippets/vim.snip

88 lines
1.5 KiB
Plaintext
Raw Normal View History

2012-02-02 04:33:35 +00:00
snippet if
abbr if endif
2012-10-21 08:51:07 +00:00
options head
2012-02-02 04:33:35 +00:00
if ${1:condition}
${0}
endif
2012-10-21 08:51:07 +00:00
snippet elseif
options head
2012-10-06 09:00:21 +00:00
elseif ${1:/* condition */}
2012-02-02 04:33:35 +00:00
${0}
snippet ifelse
abbr if else endif
2012-10-21 08:51:07 +00:00
options head
2012-02-02 04:33:35 +00:00
if ${1:condition}
${2}
else
${3}
2012-02-02 04:33:35 +00:00
endif
snippet for
abbr for in endfor
2012-10-21 08:51:07 +00:00
options head
2012-02-02 04:33:35 +00:00
for ${1:var} in ${2:list}
${0}
endfor
snippet while
abbr while endwhile
2012-10-21 08:51:07 +00:00
options head
2012-02-02 04:33:35 +00:00
while ${1:condition}
${0}
endwhile
snippet function
abbr func endfunc
alias func
2012-10-21 08:51:07 +00:00
options head
2012-02-02 04:33:35 +00:00
function! ${1:func_name}(${2})
${0}
endfunction
snippet try
abbr try endtry
2012-10-21 08:51:07 +00:00
options head
2012-02-02 04:33:35 +00:00
try
${1}
catch /${2:pattern}/
${3}
endtry
2012-10-19 02:02:08 +00:00
snippet catch
2012-10-21 08:51:07 +00:00
options head
2012-10-19 02:02:08 +00:00
catch ${1:/${2:pattern: empty, E484, Vim(cmdname):{errmsg\\}\}/}
2012-02-02 04:33:35 +00:00
snippet log
2012-10-21 08:51:07 +00:00
options head
2012-02-02 04:33:35 +00:00
echomsg string(${1})
snippet command
abbr command call function
2012-10-21 08:51:07 +00:00
options head
2012-02-02 04:33:35 +00:00
command! ${1:command_name} call ${2:func_name}
snippet customlist
abbr customlist complete function
2012-10-21 08:51:07 +00:00
options head
2012-02-02 04:33:35 +00:00
function! ${1:func_name}(arglead, cmdline, cursorpos)
return filter(${2:list}, 'stridx(v:val, a:arglead) == 0')
endfunction
snippet augroup
abbr augroup with autocmds
2012-10-21 08:51:07 +00:00
options head
augroup ${1}
autocmd!
autocmd ${2:event}
augroup END
snippet redir
abbr redir => var
options head
redir => ${1}
${2:}
redir END