From 9a73473e7adfc4944f3f3b60f61443898aa19493 Mon Sep 17 00:00:00 2001 From: marius Date: Wed, 30 Dec 2015 20:57:35 +0100 Subject: [PATCH] Fix highlighting for nested visual tabstob Consider the snippet snippet test ${1:${VISUAL}} endsnippet A missing 'extend' keyword caused the inner closing bracket to end both the inner 'snipVisual' and the outer 'snipTabStop' regions. Anything after the inner bracket was considered 'snipSnippetBody' and thus highlighted incorrectly. --- syntax/snippets.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/snippets.vim b/syntax/snippets.vim index 3a044ce..cfd5fc3 100644 --- a/syntax/snippets.vim +++ b/syntax/snippets.vim @@ -112,7 +112,7 @@ syn region snipBalancedBraces start="{" end="}" contained transparent extend syn cluster snipTokens add=snipTabStop syn cluster snipTabStopTokens add=snipTabStop -syn region snipVisual matchgroup=snipVisual start="\${VISUAL[:}/]\@=" end="}" contained contains=snipVisualDefault,snipTransformationPattern +syn region snipVisual matchgroup=snipVisual start="\${VISUAL[:}/]\@=" end="}" contained contains=snipVisualDefault,snipTransformationPattern extend syn region snipVisualDefault matchgroup=snipVisual start=":" end="\ze[}/]" contained contains=snipTabStopEscape nextgroup=snipTransformationPattern syn cluster snipTokens add=snipVisual syn cluster snipTabStopTokens add=snipVisual