From f8ba98c38bf8e6f6fa853975377feca753835420 Mon Sep 17 00:00:00 2001 From: Michael Sanders Date: Sun, 29 Mar 2009 18:00:13 -0400 Subject: [PATCH] fixed bug with single quotes in snippet triggers --- plugin/snipMate.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/snipMate.vim b/plugin/snipMate.vim index 1209ca8..dbdf03b 100644 --- a/plugin/snipMate.vim +++ b/plugin/snipMate.vim @@ -1,6 +1,6 @@ " File: snipMate.vim " Author: Michael Sanders -" Version: 0.76 +" Version: 0.77 " Description: snipMate.vim implements some of TextMate's snippets features in " Vim. A snippet is a piece of often-typed text that you can " insert into your document using a trigger word followed by a "". @@ -163,9 +163,9 @@ endf fun s:GetSnippet(word, scope) let word = a:word wh !exists('g:snippet') - if exists('s:snippets["'.a:scope.'"]['''.word.''']') + if exists('s:snippets["'.a:scope.'"]["'.escape(word, '\"').'"]') let g:snippet = s:snippets[a:scope][word] - elseif exists('s:multi_snips["'.a:scope.'"]['''.word.''']') + elseif exists('s:multi_snips["'.a:scope.'"]["'.escape(word, '\"').'"]') let g:snippet = s:ChooseSnippet(a:scope, word) else if match(word, '\W') == -1 | break | endif