From b02c3ee895ba3144e98fe1c5cf53ddde4aee4634 Mon Sep 17 00:00:00 2001 From: "Terry N. Brown" Date: Mon, 6 May 2019 15:29:48 -0400 Subject: [PATCH] This is the correct thing to do, vim-wise, although whether it has any impact depends on how the user has folding set up in vim. I confirmed that with the change, a folding setup that uses these variables works, whereas without the change, the same setup doesn't work. Change only effects a file that has to be manually copied to the user's ~/.vim/syntax folder, so it won't impact jinja execution in any way. --- ext/Vim/jinja.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/Vim/jinja.vim b/ext/Vim/jinja.vim index 2fd5838a..c81f5941 100644 --- a/ext/Vim/jinja.vim +++ b/ext/Vim/jinja.vim @@ -82,6 +82,9 @@ syn region jinjaRaw matchgroup=jinjaRawDelim start="{%\s*raw\s*%}" end="{%\s*end " Jinja comments syn region jinjaComment matchgroup=jinjaCommentDelim start="{#" end="#}" containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaString,jinjaComment +" help support folding for some setups +setlocal commentstring={#%s#} +setlocal comments=s:{#,e:#} " Block start keywords. A bit tricker. We only highlight at the start of a " tag block and only if the name is not followed by a comma or equals sign -- 2.47.2