diff options
Diffstat (limited to 'ftdetect')
| -rw-r--r-- | ftdetect/polyglot.vim | 18 | 
1 files changed, 10 insertions, 8 deletions
| 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 | 
