I'm trying to detect Go files in vim. I've set this up normally on other computers but this one is stuck.
:set filetype?
filetype=go
So it knows that it's a go file, but isn't triggering the syntax highlighting.
However,
:set filetype=go
triggers it correctly.
:filetype detect
doesn't work, and reopening the file :e! turns syntax highlighting off, even though filetype remains set to "go".
I have
set rtp+=/usr/local/go/misc/vim
filetype plugin indent on
syntax on
in my .vimrc (as the instructions say).
What's going on? I suspect there's some other configuration that's undoing the syntax highlighting, but lack the knowledge of where to find it.
I'm not sure exactly what the problem is… However, you can try :scriptnames
to see what files were loaded by Vim.
One step further, you can set verbose=9
in your .vimrc
and restart Vim. Careful, this is really verbose, try to tweak that number down.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With