]> Cypherpunks repositories - gostls13.git/commit
vim: fix go filetype detection
authorPaul Sbarra <Sbarra.Paul@gmail.com>
Sun, 18 Dec 2011 23:42:32 +0000 (10:42 +1100)
committerDavid Symonds <dsymonds@golang.org>
Sun, 18 Dec 2011 23:42:32 +0000 (10:42 +1100)
commit41f4ba3ae53153d3de104d5f1af38109a83bc942
tree99bc7c3fb28f44f5d96e95c1be313ef6863cb093
parent31cc66bc52d26ffb2115119ab3b646e096d6627e
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
misc/vim/ftdetect/gofiletype.vim