diff --git a/plugin/snipMate.vim b/plugin/snipMate.vim index 14a5347..ff5e6e2 100644 --- a/plugin/snipMate.vim +++ b/plugin/snipMate.vim @@ -145,13 +145,13 @@ endf " Check if word under cursor is snippet trigger; if it isn't, try checking if " the text after non-word characters is (e.g. check for "foo" in "bar.foo") -fun s:GetSnippet(scope, ft) - let word = a:scope +fun s:GetSnippet(word, scope) + let word = a:word wh !exists('s:snippet') - if exists('s:snippets["'.a:ft.'"]["'.word.'"]') - let s:snippet = s:snippets[a:ft][word] - elseif exists('s:multi_snips["'.a:ft.'"]["'.word.'"]') - let s:snippet = s:ChooseSnippet(a:ft, word) + if exists('s:snippets["'.a:scope.'"]["'.word.'"]') + let s:snippet = s:snippets[a:scope][word] + elseif exists('s:multi_snips["'.a:scope.'"]["'.word.'"]') + let s:snippet = s:ChooseSnippet(a:scope, word) else if match(word, '\W') == -1 | break | endif let word = substitute(word, '.\{-}\W', '', '')