From 271b63d71707720ad0d35590b8cb50f8f8f43014 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 11 May 2015 15:05:13 +0200 Subject: Update --- ftdetect/polyglot.vim | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'ftdetect') diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 3cec93cf..8edb9a9d 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -48,18 +48,19 @@ autocmd BufNewFile,BufRead * let s:current_fileformats = '' let s:current_fileencodings = '' function! s:gofiletype_pre() - let s:current_fileformats = &g:fileformats - let s:current_fileencodings = &g:fileencodings - set fileencodings=utf-8 fileformats=unix - setlocal filetype=go + let s:current_fileformats = &g:fileformats + let s:current_fileencodings = &g:fileencodings + set fileencodings=utf-8 fileformats=unix + setlocal filetype=go endfunction function! s:gofiletype_post() - let &g:fileformats = s:current_fileformats - let &g:fileencodings = s:current_fileencodings + let &g:fileformats = s:current_fileformats + let &g:fileencodings = s:current_fileencodings endfunction au BufNewFile *.go setlocal filetype=go fileencoding=utf-8 fileformat=unix au BufRead *.go call s:gofiletype_pre() au BufReadPost *.go call s:gofiletype_post() +au BufRead,BufNewFile *.tmpl set filetype=gohtmltmpl autocmd BufNewFile,BufRead *.haml,*.hamlbars,*.hamlc setf haml autocmd BufNewFile,BufRead *.sass setf sass autocmd BufNewFile,BufRead *.scss setf scss @@ -77,8 +78,9 @@ endfun au BufNewFile,BufRead * call s:SelectJavascript() autocmd BufNewFile,BufRead *.json set filetype=json autocmd BufNewFile,BufRead *.jsonp set filetype=json -au BufNewFile,BufRead *.ejs set filetype=jst -au BufNewFile,BufRead *.jst set filetype=jst +au BufNewFile,BufRead *.ejs set filetype=jst +au BufNewFile,BufRead *.jst set filetype=jst +au BufNewFile,BufRead *.djs set filetype=jst au BufNewFile,BufRead *.hamljs set filetype=jst au BufNewFile,BufRead *.ect set filetype=jst autocmd BufNewFile,BufRead *.less setf less -- cgit v1.2.3