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

119 lines
2.4 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-10-29 10:27:18 +00:00
if ${1:#:condition}
2012-10-29 22:38:37 +00:00
${0:TARGET}
2012-02-02 04:33:35 +00:00
endif
2012-10-21 08:51:07 +00:00
snippet elseif
options head
2012-10-30 08:53:14 +00:00
elseif ${1:#:condition}
2012-10-29 22:38:37 +00:00
${0:TARGET}
2012-02-02 04:33:35 +00:00
snippet ifelse
abbr if else endif
2012-10-21 08:51:07 +00:00
options head
2012-10-29 10:27:18 +00:00
if ${1:#:condition}
2012-10-29 22:38:37 +00:00
${2:TARGET}
2012-02-02 04:33:35 +00:00
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-10-29 10:27:18 +00:00
for ${1:#:var} in ${2:#:list}
2012-10-29 22:38:37 +00:00
${0:TARGET}
2012-02-02 04:33:35 +00:00
endfor
snippet while
abbr while endwhile
2012-10-21 08:51:07 +00:00
options head
2012-10-29 10:27:18 +00:00
while ${1:#:condition}
2012-10-29 22:38:37 +00:00
${0:TARGET}
2012-02-02 04:33:35 +00:00
endwhile
snippet function
abbr func endfunc
alias func
2012-10-21 08:51:07 +00:00
options head
2012-10-29 10:27:18 +00:00
function! ${1:#:func_name}(${2})
2012-10-29 22:38:37 +00:00
${0:TARGET}
2012-02-02 04:33:35 +00:00
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
2012-10-29 22:38:37 +00:00
${1:TARGET}
2012-10-29 10:27:18 +00:00
catch /${2:#:pattern}/
2012-02-02 04:33:35 +00:00
${3}
endtry
2012-10-28 09:58:55 +00:00
snippet tryfinally
abbr try ... finally ... endtry
alias tryf
options head
try
2012-10-29 22:38:37 +00:00
${1:TARGET}
2012-10-28 09:58:55 +00:00
finally
${2}
endtry
2012-10-19 02:02:08 +00:00
snippet catch
2012-10-21 08:51:07 +00:00
options head
2012-10-29 10:27:18 +00:00
catch ${1:/${2:#:pattern: empty, E484, Vim(cmdname):{errmsg\\}\}/}
2012-10-19 02:02:08 +00:00
2012-10-29 02:22:37 +00:00
snippet echomsg
alias log
2012-10-21 08:51:07 +00:00
options head
2012-10-29 22:38:37 +00:00
echomsg string(${1:TARGET})
2012-02-02 04:33:35 +00:00
snippet command
abbr command call function
2012-10-21 08:51:07 +00:00
options head
2012-10-29 10:27:18 +00:00
command! ${1:#:command_name} call ${2:#:func_name}
2012-02-02 04:33:35 +00:00
snippet customlist
abbr customlist complete function
2012-10-21 08:51:07 +00:00
options head
2012-10-29 10:27:18 +00:00
function! ${1:#:func_name}(arglead, cmdline, cursorpos)
return filter(${2:#:list}, 'stridx(v:val, a:arglead) == 0')
2012-02-02 04:33:35 +00:00
endfunction
snippet augroup
abbr augroup with autocmds
2012-10-21 08:51:07 +00:00
options head
2012-10-30 08:53:14 +00:00
augroup ${1:#:augroup_name}
autocmd!
2012-10-29 10:27:18 +00:00
autocmd ${2:#:event}
augroup END
snippet redir
abbr redir => var
options head
2012-10-29 10:27:18 +00:00
redir => ${1:#:var}
2012-10-29 22:38:37 +00:00
${2::TARGET}
redir END
2012-12-01 15:44:38 +00:00
snippet NeoBundle
2013-01-22 01:49:21 +00:00
alias neobundle
2012-12-01 15:44:38 +00:00
abbr NeoBundle ''
NeoBundle '`getreg('+')=='' ? '<\`0\`>' : getreg('+')`'${0}
2013-01-22 01:48:34 +00:00
snippet NeoBundleLazy
2013-01-22 01:49:21 +00:00
alias neobundlelazy
2013-01-22 01:48:34 +00:00
abbr NeoBundleLazy ''
NeoBundleLazy '`getreg('+')=='' ? '<\`0\`>' : getreg('+')`', { 'autoload' : {
\ ${0}
\ }}
2013-01-29 23:03:53 +00:00
snippet autoload
abbr autoload func endfunc
alias afunction afunc
prev_word '^'
function! `substitute(matchstr(neosnippet#util#expand('%:p:r'), '/autoload/\zs.*$'), '/', '#', 'g')`#${1:#:func_name}(${2:#:args})
${0}
endfunction