Vim Tips Wiki


1,625pages on
this wiki
Add New Page

Use this page to discuss script 1487 django: syntax highlighting for Django templates

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on
  • This page may be out of date: check the script's page above, and its release notes.


I wanted to use folds with the htmldjango syntax file, but the curly brackets used for template variables were clashing with the default fold markers ("{{{,}}}"). I just added the "oneline" option to line 30 of htmldjango.vim (V. 2007 Jan 26). Eg.:

  syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display containedin=ALLBUT,@djangoBlocks


  syn region djangoVarBlock start="{{" end="}}" oneline contains=djangoFilter,djangoArgument,djangoVarError display containedin=ALLBUT,@djangoBlocks

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.