diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2014-08-12 23:45:36 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2014-08-12 23:45:36 +0200 |
commit | 90b24287deb9da69a8079599b8525e2be412f7f2 (patch) | |
tree | 78225d68b68f45ffa55d9fc84b10e64941abf96a /ftdetect | |
parent | 5f1223fbc5285689db812236c9100329740a805b (diff) | |
download | vim-polyglot-90b24287deb9da69a8079599b8525e2be412f7f2.tar.gz vim-polyglot-90b24287deb9da69a8079599b8525e2be412f7f2.zip |
Update
Diffstat (limited to 'ftdetect')
-rw-r--r-- | ftdetect/polyglot.vim | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index d1cc2bf0..17dad437 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -35,21 +35,6 @@ autocmd BufNewFile,BufRead * \ if getline(1) =~ '^From \x\{40\} Mon Sep 17 00:00:00 2001$' | \ set filetype=gitsendemail | \ endif -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 -endfunction -function! s:gofiletype_post() - 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() autocmd BufNewFile,BufRead *.haml,*.hamlbars,*.hamlc setf haml autocmd BufNewFile,BufRead *.sass setf sass autocmd BufNewFile,BufRead *.scss setf scss @@ -133,6 +118,7 @@ autocmd BufReadPost *.pl,*.pm,*.t call s:DetectPerl6() autocmd BufNew,BufRead *.nqp setf perl6 autocmd BufNewFile,BufRead *.proto setfiletype proto au! BufRead,BufNewFile *.pp setfiletype puppet +au! BufRead,BufNewFile Puppetfile setfiletype ruby function! s:setf(filetype) abort if &filetype !=# a:filetype let &filetype = a:filetype |