Vim Django template syntax checker

388 views
Skip to first unread message

Some Developer

unread,
Nov 26, 2012, 10:39:06 AM11/26/12
to django...@googlegroups.com
I've been using Syntastic along with Vim for Django development for
sometime but I'd like to see if I could improve my Vim configuration.
The problem with Syntastic is that it does not work too well when
checking partial HTML documents (which is often the case with Django
because of template inheritance) and it certainly does not like the
Django template tags in HTML documents.

Does anyone know of a decent syntax checker for Vim that has full
support for Django templates and partial HTML documents?

As an aside I'm always on the look out for ways to improve my Vim
configuration for Python / Django development so if you have any tips or
plugins that you use to make development easier I'm all ears :).

Tom Evans

unread,
Nov 27, 2012, 6:45:31 AM11/27/12
to django...@googlegroups.com
It's not perfect, but ft=django should get you some reasonable
template highlighting, and ft=htmldjango will get mixed mode template
and html highlighting. It's built-in to my version of vim, 7.3.632.

For general python syntax, I use an updated one from vim.org:

http://www.vim.org/scripts/script.php?script_id=790

and have "let python_highlight_all=1" in my .vimrc

Cheers

Tom
Reply all
Reply to author
Forward
0 new messages