Jan Mészáros reflections on technology and society

22Oct/091

VIM tab configuration for Django HTML templates

This tiny trick allows you to set tabs (and anything else of course) for Django template filetype. VIM has build-in filetype named "htmldjango", which does all the magic shown in the example configuration below.

An example .vimrc configuration file uses the "autocmd" VIM command, whis must be available in your installation.

  1. if has("autocmd")
  2.     autocmd FileType htmldjango set tabstop=4|set shiftwidth=4|set expandtab
  3. endif
Tagged as: Leave a comment
Comments (1) Trackbacks (0)
  1. Hello from Russia!
    Can I quote a post “No teme” in your blog with the link to you?


Leave a comment


No trackbacks yet.