1
0
mirror of https://github.com/gryf/snipmate.vim.git synced 2026-01-03 12:24:15 +01:00

fixed objc/cpp command-based snippets

This commit is contained in:
Michael Sanders
2009-03-01 19:24:43 -05:00
parent dd8b39a9b5
commit a8109fa38f
14 changed files with 18 additions and 52 deletions

View File

@@ -16,7 +16,7 @@ endif
let loaded_snips = 1
if !exists('snips_author') | let snips_author = 'Me' | endif
com! -nargs=+ -bang Snipp call s:MakeSnippet(<q-args>, &ft, <bang>0)
com! -nargs=+ -bang Snipp call s:MakeSnippet(<q-args>, snippet_filetype, <bang>0)
com! -nargs=+ -bang GlobalSnip call s:MakeSnippet(<q-args>, '_', <bang>0)
let s:snippets = {} | let s:multi_snips = {}
@@ -133,9 +133,8 @@ fun! TriggerSnippet()
let col = col('.')-len(word)
sil exe 's/'.escape(word, '.^$/\*[]').'\%#//'
return s:ExpandSnippet(col)
elseif exists('s:snipPos')
return s:JumpTabStop()
endif
if exists('s:snipPos') | return s:JumpTabStop() | endif
return exists('s:sid') ? {s:sid}_SuperTab('n') : "\<tab>"
endf