# vim.snippets - Snippets for vim file type
#
#===========================================================================
# Global functions
#
global !p
from UltiSnips_globals import *
endglobal



#===========================================================================
# Conditionals
#
snippet if "if..." b
if ($1)
  ${VISUAL}$0
endif
endsnippet

snippet ife "if...else" b
if ($1)
  $0
else
endif
endsnippet

snippet eli "elseif..." w
elseif ($1)
  ${VISUAL}$0
endsnippet

snippet el "else..." w
else
  ${VISUAL}$0
endsnippet


snippet 'fu(n(ction)?)?' "function" br
function! ${1:`!v expand('%:r') . '#'`}${2:funcName}(${3})
  " Description: $0
endfunction
endsnippet


snippet aug "autogroup" b
augroup ${1:augroup_Name}
  autocmd!
  ${VISUAL}$0
augroup END
endsnippet


# vim:ft=snippets:
