This is a creation in Article, where the information may have evolved or changed. after you have installed go, you need to set the following environment variables:
- goroot:go installation directory
- gopath: A directory for the Go language package that cannot be
- gobin:go binary file directory, written%goroot%\bin is good
1, install Gocode, set automatic completion code. go get-u-ldflags-h=windowsgui github.com/nsf/gocode, if successful, Gobin directory will have gocode.exe files, Gopath will have src\github.com\nsf\ Gocode directory. The _VIMRC file in the Vim installation directory is added filetype plugin indent on
Syntax on at this point the CTRL+P key combination can be called to complete the code hint. 2, set Golang syntax highlighting. & nbsp Download Go1.3beat2 Source (after the misc in the Vim directory), will download the directory of go/misc/vim/in the corresponding syntax, Ftplugin, indent, compiler go.vim files copied to/usr/ share/vim/vim74/the corresponding directory, the Ftdetect folder includes files copied to Vim74.