Skip to content
Myr

Don't use setlocal in syntax file (#1164)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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.

authored by Ken Crowell · committed by GitHub · parent 35aa194 · Browse files · 1 file+0 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+0 added−3 removed

  • other:+0 added−3 removed

1 file+0 added−3 removed

modified:ext/Vim/jinja.vim-3 removed
80 unmodified lines
81syn region jinjaRaw matchgroup=jinjaRawDelim start="{%\s*raw\s*%}" end="{%\s*endraw\s*%}" containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaString,jinjaComment8283" Jinja comments84syn region jinjaComment matchgroup=jinjaCommentDelim start="{#" end="#}" containedin=ALLBUT,jinjaTagBlock,jinjaVarBlock,jinjaString,jinjaComment85" help support folding for some setups86setlocal commentstring={#%s#}87setlocal comments=s:{#,e:#}8586" Block start keywords. A bit tricker. We only highlight at the start of a87" tag block and only if the name is not followed by a comma or equals sign88" which usually means that we have to deal with an assignment.
47 unmodified lines