This is a creation in Article, where the information may have evolved or changed.
Verification is fully available, System OS 10.9 Just follow the steps, waiting for you is the other side of victory.
Only a little problem, vim couldn ' t use link, so I must copy all $GOROOT/misc/vim to ~/.vim.
That's all.
Happy New year!
Vim plugins for Go (http://golang.org) ======================================to with all of the Vim plugins, add these lines to Your $HOME/.VIMRC. "Some Linux distributions set filetype IN/ETC/VIMRC. "Clear filetype flags before changing runtimepath to force Vim to reload them. filetype off filetype plugin indent off set runtimepath+= $GOROOT/misc/vim filetype plugin indent on syntax onif you WA NT to select fewer plugins with the instructions in the rest ofthis file. A popular configuration is the gofmt Go source files when they is saved. To does that, add this line to the end of your $HOME/.VIMRC. Autocmd FileType go autocmd bufwritepre <buffer> fmtvim Syntax highlighting-----------------------to install Automatic syntax highlighting for GO programs:1. Copy or link the filetype detection script to the Ftdetect directory Underneath your VIM runtime directory (normally $HOME/.vim/ftdetect) 2. Copy or link Syntax/go.vim to the syntax directory underneath your vim RuntimE directory (normally $HOME/.vim/syntax). Linking this file rather than just copying it'll ensure any changes is automatically reflected in your syntax h Ighlighting. 3. Add the following line to your. vimrc file (normally $HOME/.VIMRC): syntax onin A typical UNIX environment you migh T accomplish this using the Followingcommands:mkdir-p $HOME/.vim/ftdetect mkdir-p $HOME/.vim/syntax mkdir-p $HOME/. Vim/autoload/go ln-s $GOROOT/misc/vim/ftdetect/gofiletype.vim $HOME/.vim/ftdetect/ln-s $GOROOT/misc/vim/syntax/ Go.vim $HOME/.vim/syntax ln-s $GOROOT/misc/vim/autoload/go/complete.vim $HOME/.vim/autoload/go echo "Syntax on" >&G T $HOME/.vimrcvim filetype plugins--------------------To install one of the available filetype plugins:1. Same as 1 above. 2. Copy or link Ftplugin/go.vim to the Ftplugin directory underneath your VIM runtime directory (normally $HOME/.vim /ftplugin). Copy or link one or more additional plugins from Ftplugin/go/*.vim to the Go-sPecific subdirectory in the same place ($HOME/.vim/ftplugin/go/*.vim). 3. Add the following line to your. vimrc file (normally $HOME/.VIMRC): filetype plugin Onvim indentation plugin------- ---------------to install automatic indentation:1. Same as 1 above. 2. Copy or link Indent/go.vim to the indent directory underneath your VIM runtime directory (normally $HOME/.vim/inden T). 3. Add the following line to your. vimrc file (normally $HOME/.VIMRC): filetype indent onvim compiler plugin------------- ------To install the compiler Plugin:1 same as 1 above. 2. Copy or link Compiler/go.vim to the compiler directory underneath your VIM runtime directory (normally $HOME/.vim/c Ompiler). 3. Activate the compiler plugin with ": Compiler Go". To always enable the compiler plugin in Go source files add a autocommand to your. vimrc file (normally $HOME/.VI MRC): Autocmd FileType go compiler gogodoc plugin------------to install Godoc plugin:1. Same as 1 above. 2. Copy or link Plugin/godoc.vim to $HOME/.vim/plugin/godoc, Syntax/godoc.vim to $HOME/.vim/syntax/godoc.vim, and Autoload/go/complete.vim to $HOME/.vim/autoload/go/complete.vim.