" Detect django html files au BufRead *.html call s:DetectDjango() function! s:DetectDjango() let n = 0 while n < 50 let n = n + 1 if getline(n) =~ '{[%{#]' set filetype=htmldjango break endif endwhile endfunction " vim: et sw=2 ts=2 sts=2: