diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2018-02-06 11:15:01 +0800 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2018-02-06 11:15:01 +0800 |
commit | 18efda3933a867dd21df483bbfeae52231783d46 (patch) | |
tree | a2af3be10f2140314656d1c2e0e53ef1a1c1b6c6 /ftdetect/polyglot.vim | |
parent | bfc6ed9fbafc0758aaab228df70a3656368d8497 (diff) | |
download | vim-polyglot-18efda3933a867dd21df483bbfeae52231783d46.tar.gz vim-polyglot-18efda3933a867dd21df483bbfeae52231783d46.zip |
Update
Diffstat (limited to 'ftdetect/polyglot.vim')
-rw-r--r-- | ftdetect/polyglot.vim | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 4d34aa1a..6bf83344 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -280,6 +280,8 @@ augroup END augroup filetypedetect " go:fatih/vim-go:_BASIC +" vint: -ProhibitAutocmdWithNoGroup + " We take care to preserve the user's fileencodings and fileformats, " because those settings are global (not buffer local), yet we want " to override them for loading Go files, which are defined to be UTF-8. @@ -300,18 +302,16 @@ function! s:gofiletype_post() let &g:fileencodings = s:current_fileencodings endfunction -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() +" Note: should not use augroup in ftdetect (see :help ftdetect) +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 -augroup end +au BufRead,BufNewFile *.tmpl set filetype=gohtmltmpl " vim: sw=2 ts=2 et augroup END |