Commit 41f4ba3a authored by Paul Sbarra's avatar Paul Sbarra Committed by David Symonds

vim: fix go filetype detection

The filetype needs to be set during BufRead in order for the did_filetype() check to prevent the file being detected as a conf file.  One example where this can occur is if a cgo file has a #include at the top of the file.  The # is detected in vim's generic configuration (conf file) toward the bottom of filetype.vim

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5496066
parent 31cc66bc
au BufReadPre,BufNewFile *.go set filetype=go fileencoding=utf-8 fileencodings=utf-8 au BufRead,BufNewFile *.go set filetype=go fileencoding=utf-8 fileencodings=utf-8
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment