From 392226a847d2a584c992dfb034cb71f7cd54987f Mon Sep 17 00:00:00 2001 From: Michael Sanders Date: Mon, 2 Mar 2009 22:28:16 -0500 Subject: [PATCH] added automatic setting of g:snippet_filetype to the 'guard' snippet --- after/ftplugin/vim_snips.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/after/ftplugin/vim_snips.vim b/after/ftplugin/vim_snips.vim index edd68ae..e93b1b3 100644 --- a/after/ftplugin/vim_snips.vim +++ b/after/ftplugin/vim_snips.vim @@ -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"