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

fixed bug with single quotes in snippet triggers

This commit is contained in:
Michael Sanders
2009-03-29 18:00:13 -04:00
parent 0f61c6be4f
commit f8ba98c38b

View File

@@ -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 "<tab>".
@@ -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