From: Ken Crowell Date: Sun, 12 Apr 2020 16:46:08 +0000 (-0300) Subject: Don't use setlocal in syntax file (#1164) X-Git-Tag: 3.0.0rc1~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91eb39b153ce387428d8dc72385440a597cffeca;p=thirdparty%2Fjinja.git Don't use setlocal in syntax file (#1164) I'm not 100% sure that one should not use `setlocal` in a syntax file, but this breaks other filetypes that may include this syntax file, like the vim-markdown plugin. The `comments` and `commentstring` get set for that markdown buffer with the jinja settings. See https://github.com/dhruvasagar/vim-table-mode/issues/162#issuecomment-595317626 for an example of side effects. --- diff --git a/ext/Vim/jinja.vim b/ext/Vim/jinja.vim index e2a5bbf6..63f0d99a 100644 --- a/ext/Vim/jinja.vim +++ b/ext/Vim/jinja.vim @@ -82,9 +82,6 @@ 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