diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2017-11-19 21:26:59 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2017-11-19 21:27:05 +0100 |
commit | d219055bc845253eff2b27d30a23b11b97b7ee9d (patch) | |
tree | a4586dfdbce3a304759a0c34175ee41fdede4e17 /ftdetect/polyglot.vim | |
parent | 0e9041f29a3288b6685aafc63d914c11fef539ba (diff) | |
download | vim-polyglot-d219055bc845253eff2b27d30a23b11b97b7ee9d.tar.gz vim-polyglot-d219055bc845253eff2b27d30a23b11b97b7ee9d.zip |
Update
Diffstat (limited to 'ftdetect/polyglot.vim')
-rw-r--r-- | ftdetect/polyglot.vim | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index d3a204e0..e42ae508 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -339,15 +339,18 @@ function! s:gofiletype_post() let &g:fileencodings = s:current_fileencodings endfunction -au BufNewFile *.go setfiletype go | setlocal fileencoding=utf-8 fileformat=unix -au BufRead *.go call s:gofiletype_pre("go") -au BufReadPost *.go call s:gofiletype_post() +augroup vim-go-filetype + autocmd! + au BufNewFile *.go setfiletype go | setlocal fileencoding=utf-8 fileformat=unix + au BufRead *.go call s:gofiletype_pre("go") + au BufReadPost *.go call s:gofiletype_post() -au BufNewFile *.s setfiletype asm | setlocal fileencoding=utf-8 fileformat=unix -au BufRead *.s call s:gofiletype_pre("asm") -au BufReadPost *.s call s:gofiletype_post() + au BufNewFile *.s setfiletype asm | setlocal fileencoding=utf-8 fileformat=unix + au BufRead *.s call s:gofiletype_pre("asm") + au BufReadPost *.s call s:gofiletype_post() -au BufRead,BufNewFile *.tmpl set filetype=gohtmltmpl + au BufRead,BufNewFile *.tmpl set filetype=gohtmltmpl +augroup end " vim: sw=2 ts=2 et augroup END @@ -919,7 +922,7 @@ fun! s:DetectScala() endif endfun -au BufRead,BufNewFile *.scala set filetype=scala +au BufRead,BufNewFile *.scala,*.sc set filetype=scala au BufRead,BufNewFile * call s:DetectScala() " Install vim-sbt for additional syntax highlighting. @@ -1021,8 +1024,8 @@ augroup END augroup filetypedetect " toml:cespare/vim-toml -" Rust uses several TOML config files that are not named with .toml. -autocmd BufNewFile,BufRead *.toml,Cargo.lock,*/.cargo/config set filetype=toml +" Go dep and Rust use several TOML config files that are not named with .toml. +autocmd BufNewFile,BufRead *.toml,Gopkg.lock,Cargo.lock,*/.cargo/config set filetype=toml augroup END augroup filetypedetect |