Glench / Vim-Jinja2-Syntax

An up-to-date jinja2 syntax file.
https://github.com/mitsuhiko/jinja2
BSD 3-Clause "New" or "Revised" License
343 stars 64 forks source link

Matchit: multiline tags and `else` statement #29

Open buzuck opened 3 years ago

buzuck commented 3 years ago

Hi :slightly_smiling_face:

When a tag is stretches on multiple lines for readability, it is no longer detected by the plugin matchit/match-up

{% for very_long in dict
   if true and not false %}
[...]
{% endfor %}

I tried to change the variable b:match_words by adding a \_ with no luck though: '{%[-+]\? *\%(end\)\@!\(\w\+\)\>\_.\{-}%}:{%-\? *end\1\>.\{-}%}'

There is also some improvement that could be done on this plugin. The else statement is not paired with if/endif.