diff options
Diffstat (limited to 'autoload')
| -rw-r--r-- | autoload/polyglot.vim | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/autoload/polyglot.vim b/autoload/polyglot.vim index b7113f31..325287fc 100644 --- a/autoload/polyglot.vim +++ b/autoload/polyglot.vim @@ -370,6 +370,12 @@ func! polyglot#DetectHtmlFiletype()    if line =~# '^\(%\|<[%&].*>\)'      set ft=mason | return    endif +  for lnum in range(1, min([line("$"), 50])) +    let line = getline(lnum) +    if line =~# '{{.*}}\|{%-\=\s*\(end.*\|extends\|block\|macro\|set\|if\|for\|include\|trans\)\(\<\|\>\)' +      set ft=jinja.html | return +    endif +  endfor    set ft=html | return  endfunc | 
