1
0
mirror of https://github.com/gryf/snipmate.vim.git synced 2025-12-27 17:02:36 +01:00

added a default "guard" snippet for checking if a snippet has been loaded more than once, and put cpp snippets in their own file"

This commit is contained in:
Michael Sanders
2009-03-02 21:38:07 -05:00
parent 4ec62447c8
commit 3db3319e80
4 changed files with 29 additions and 19 deletions

View File

@@ -9,6 +9,9 @@ exe 'Snipp snip exe "Snipp ${1:trigger}"${2}'
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}"
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"