add snippet options to some snippets

This commit is contained in:
Lucas Hoffmann 2014-05-06 14:53:52 +02:00
parent 27c2c2ba7b
commit 2672bde2fb
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ snippet "b(egin)?" "begin{} / end{}" br
\end{$1} \end{$1}
endsnippet endsnippet
snippet tab "tabular / array environment" snippet tab "tabular / array environment" b
\begin{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}{${2:c}} \begin{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}{${2:c}}
$0${2/((?<=.)c|l|r)|./(?1: & )/g} $0${2/((?<=.)c|l|r)|./(?1: & )/g}
\end{$1${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}} \end{$1${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}

View File

@ -3,20 +3,20 @@ priority -50
########################################################################### ###########################################################################
# SnipMate Snippets # # SnipMate Snippets #
########################################################################### ###########################################################################
snippet gvar "Global / configuration variable" snippet gvar "Global / configuration variable" b
if !exists("g:${1:MyUltraImportantVar}") if !exists("g:${1:MyUltraImportantVar}")
let g:$1 = ${2:"${3:<tab>}"} let g:$1 = ${2:"${3:<tab>}"}
endif endif
endsnippet endsnippet
snippet guard "script reload guard" snippet guard "script reload guard" b
if exists('${1:did_`!p snip.rv = snip.fn.replace('.','_')`}') || &cp${2: || version < 700} if exists('${1:did_`!p snip.rv = snip.fn.replace('.','_')`}') || &cp${2: || version < 700}
finish finish
endif endif
let $1 = 1${3} let $1 = 1${3}
endsnippet endsnippet
snippet f "function" snippet f "function" b
fun ${1:function_name}(${2}) fun ${1:function_name}(${2})
${3:" code} ${3:" code}
endf endf