From 6adad88020e9af1a6732c6c250ba8fd7dfd7d7ac Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 4 Sep 2015 21:58:27 +0200 Subject: [PATCH] filetype: handle lines with `{#\s\+` as htmldjango If you have a snippet file without extends, block or load tags, but a comment at the beginning, this will handle it has `htmldjango` now, too. --- runtime/filetype.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 6bdedfdc991ce..1e891f74adb33 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -872,7 +872,7 @@ func! s:FThtml() setf xhtml return endif - if getline(n) =~ '{%\s*\(extends\|block\|load\)\>' + if getline(n) =~ '{%\s*\(extends\|block\|load\)\>\|{#\s\+' setf htmldjango return endif