1
0
mirror of https://github.com/gryf/snipmate.vim.git synced 2025-12-23 22:52:27 +01:00

added automatic setting of g:snippet_filetype to the 'guard' snippet

This commit is contained in:
Michael Sanders
2009-03-02 22:28:16 -05:00
parent 3db3319e80
commit 392226a847

View File

@@ -10,8 +10,8 @@ exe "Snipp snipp exe 'Snipp ${1:trigger}'${2}"
exe 'Snipp gsnip exe "GlobalSnip ${1:trigger}"${2}'
exe "Snipp gsnipp exe 'GlobalSnip ${1:trigger}'${2}"
exe "Snipp guard if !exists('g:loaded_snips') || exists('s:did_".
\ "${1:`substitute(expand(\"%:t:r\"), \"_snips\", \"\", \"\")`}_snips')\n\t"
\ "finish\nendif\nlet s:did_$1_snips = 1${2}"
\ "${1:`substitute(expand(\"%:t:r\"), \"_snips\", \"\", \"\")`}_snips')\n\t"
\ "finish\nendif\nlet s:did_$1_snips = 1\nlet snippet_file = '$1'${2}"
exe "Snipp f fun ${1:function_name}()\n\t${2:\" code}\nendfun"
exe "Snipp for for ${1:needle} in ${2:haystack}\n\t${3:\" code}\nendfor"