diff --git a/misc/vim/ftdetect/gofiletype.vim b/misc/vim/ftdetect/gofiletype.vim index e50c29270c0..f03a1d8dc31 100644 --- a/misc/vim/ftdetect/gofiletype.vim +++ b/misc/vim/ftdetect/gofiletype.vim @@ -1 +1 @@ -au BufRead,BufNewFile *.go set fileencoding=utf-8 filetype=go +au BufReadPre,BufNewFile *.go set filetype=go fileencoding=utf-8 fileencodings=utf-8