vim-snippets/UltiSnips/vim.snippets
Marc Weber 344ac6ea2c new policies for if, eif, el
What about wh(ile)?
drop some placeholder comments which don't add (enough) value to keep
for patterns used very often.
2013-06-23 02:30:26 +02:00

59 lines
955 B
Plaintext

###########################################################################
# SnipMate Snippets #
###########################################################################
snippet header
" File: ${1:`!v expand('%:t')`}
" Author: ${2:`!v g:snips_author`}
" Description: ${3}
${4:" Last Modified: `!v strftime("%B %d, %Y")`}
$0
endsnippet
snippet gvar "Global / configuration variable"
if !exists("g:${1:MyUltraImportantVar}")
let g:$1 = ${2:"${3:<tab>}"}
endif
endsnippet
snippet guard
if exists('${1:did_`!p snip.rv = snip.fn.replace('.','_')`}') || &cp${2: || version < 700}
finish
endif
let $1 = 1${3}
endsnippet
snippet f
fun ${1:function_name}(${2})
${3}
endf
endsnippet
snippet for
for ${1} in ${2}
${3}
endfor
endsnippet
snippet wh
while ${1}
${2}
endw
endsnippet
snippet if
if ${1}
${2}
endif
endsnippet
snippet ife
if ${1}
${2}
else
${3}
endif
endsnippet
# vim:ft=snippets: