Changes between Version 63 and Version 64 of UsingVimWithDjango


Ignore:
Timestamp:
09/21/2016 02:13:40 AM (14 months ago)
Author:
javiertury
Comment:

Update information about django templates for vim 7.1+

Legend:

Unmodified
Added
Removed
Modified
  • UsingVimWithDjango

    v63 v64  
    6969HiLink djangovariablemarkers PreProc
    7070delcommand HiLink
     71}}}
     72
     73Vim 7.1 or newer includes support for  "htmldjango" documents out of the box. With {{{filetype on}}} on your {{{~/.vimrc}}} configuration file, vim will automatically tell apart "htmldjango" documents from regular html ones. Just make sure that at least one of the first 10 lines in your html document matches the following regex from the start:
     74
     75{{{
     76{%\s*\(extends\|block\|load\)\>\|{#\s\+
     77}}}
     78
     79If you are not familiar with regexes, these are the possible options:
     80
     81{{{
     82{% extends
     83{% block
     84{% load
     85{#
    7186}}}
    7287
Back to Top