summaryrefslogtreecommitdiffstats
path: root/ftdetect/polyglot.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2014-06-08 19:38:42 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2014-06-08 19:38:42 +0200
commita59f644d49ee029df48586a6c3c358858f1e6739 (patch)
tree058906e13b6d1b32e50a69ec447fb8a3c8dd969a /ftdetect/polyglot.vim
parent33dd4b2741ce51f02dea47298c6abfc847215889 (diff)
downloadvim-polyglot-1.9.1.tar.gz
vim-polyglot-1.9.1.zip
Add liquid support for old Vim, #301.9.1
Diffstat (limited to 'ftdetect/polyglot.vim')
-rw-r--r--ftdetect/polyglot.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index 3024bb83..3e74c6ff 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -72,6 +72,18 @@ au BufNewFile,BufRead *.ejs set filetype=jst
au BufNewFile,BufRead *.jst set filetype=jst
au BufNewFile,BufRead *.hamljs set filetype=jst
autocmd BufNewFile,BufRead *.less setf less
+au BufNewFile,BufRead *.liquid set ft=liquid
+au BufNewFile,BufRead */_layouts/*.html,*/_includes/*.html set ft=liquid
+au BufNewFile,BufRead *.html,*.xml,*.textile
+ \ if getline(1) == '---' | set ft=liquid | endif
+au BufNewFile,BufRead *.markdown,*.mkd,*.mkdn,*.md
+ \ if getline(1) == '---' |
+ \ let b:liquid_subtype = 'markdown' |
+ \ set ft=liquid |
+ \ endif
+au BufNewFile,BufRead */templates/**.liquid,*/layout/**.liquid,*/snippets/**.liquid
+ \ let b:liquid_subtype = 'html' |
+ \ set ft=liquid |
autocmd BufNewFile,BufRead *.markdown,*.md,*.mdown,*.mkd,*.mkdn
\ if &ft =~# '^\%(conf\|modula2\)$' |
\ set ft=markdown |