summaryrefslogtreecommitdiffstats
path: root/ftdetect/polyglot.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2018-02-06 11:15:01 +0800
committerAdam Stankiewicz <sheerun@sher.pl>2018-02-06 11:15:01 +0800
commit18efda3933a867dd21df483bbfeae52231783d46 (patch)
treea2af3be10f2140314656d1c2e0e53ef1a1c1b6c6 /ftdetect/polyglot.vim
parentbfc6ed9fbafc0758aaab228df70a3656368d8497 (diff)
downloadvim-polyglot-18efda3933a867dd21df483bbfeae52231783d46.tar.gz
vim-polyglot-18efda3933a867dd21df483bbfeae52231783d46.zip
Update
Diffstat (limited to 'ftdetect/polyglot.vim')
-rw-r--r--ftdetect/polyglot.vim20
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