我试图用这里提供的资源和指导在ubuntu上的vim中添加Go语言语法突出显示.
Go附带了一个包含VIM语法设置的go.vim
文件,上面的页面提供了以下说明
Place $GOROOT/misc/vim/syntax/go.vim in ~/.vim/syntax/ and put the following in ~/.vim/ftdetect/go.vim:个
au BufRead,BufNewFile *.go set filetype=go
This is more or less the same vein of procedure for customizing vim syntax I've seen elsewhere (Vim 7.3 on Ubuntu 12.10 doesn't have 'ftplugin' directory anywhere and https://github.com/jnwhiteh/vim-golang/blob/master/readme.txt)
因此,我认为我在创建目录时做的事情是正确的:
~/.vim
~/.vim/语法
~/.vim/ftdetect
并按照上述说明添加
go vim to ~/.vim/语法/
au BufRead,BufNewFile *.go set filetype=go
然而,语法突出显示似乎没有发生.我是否需要做些什么来强制vim查看这些新的设置文件?