When using vim some django templates, for example:
something
{% endif %}The indentation I require is as above, but in vim it will be forced to automatically indent the line "
" forward and become:
something
{% endif %}You must finish typing the line "
" and manually change the indentation. .
What I understand is that because this is an html file, vim treats it as a normal html indentation format and ignores the if tag in django.
So what should we do to make vim treat "{% %}" as a tag in HTML?
Can I think that {% if * %} and
something
{% endif %}The automatic indentation in VS2010 is the first type. I think VIM’s processing is correct.
Because compared to ul, indenting li by one tab is a good indentation.