From 5b80ef187d5be31f02db55bb9acaf6e5c7b816e7 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Sun, 29 Jun 2014 20:06:25 -0700 Subject: [PATCH] Properly handle \` escapes in commands --- syntax/snippets.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/syntax/snippets.vim b/syntax/snippets.vim index 0d4988d..7acf165 100644 --- a/syntax/snippets.vim +++ b/syntax/snippets.vim @@ -27,9 +27,9 @@ syn match snipExtends "^extends.*" contains=snipKeyword " snippet definitions syn match snipStart "^snippet.*" contained contains=snipKeyword,snipDocString syn match snipEnd "^endsnippet" contained contains=snipKeyword -syn region snipCommand keepend start="`" end="`" contains=snipPythonCommand,snipVimLCommand -syn region snipPythonCommand keepend start="`!p" end="`" contained contains=@Python -syn region snipVimLCommand keepend start="`!v" end="`" contained contains=@Viml +syn region snipCommand keepend start="`" skip="\\[{}\\$`]" end="`" contains=snipPythonCommand,snipVimLCommand +syn region snipPythonCommand keepend start="`!p" skip="\\[{}\\$`]" end="`" contained contains=@Python +syn region snipVimLCommand keepend start="`!v" skip="\\[{}\\$`]" end="`" contained contains=@Viml syn match snipVar "\$\d*" contained syn region snipVisual matchgroup=Define start="\${VISUAL" end="}" contained syn region snipVarExpansion matchgroup=Define start="\${\d*" end="}" contained contains=snipVar,snipVarExpansion,snipCommand