sudo apt-get install golang golang-golang-x-tools golint
- set GOPATH in .bashrc, such as ~/go, where bin, pkg, src will be put
- use vundle to download vim-go from
https://github.com/fatih/vim-go - In vim, run :GoInstallBinaries
It will complain unable to download some, but so far it is enough for most functionalities.
Saving a .go file will invoke gofmt.
^x^o to auto complete
:GoDef
:GoBuild
:GoInstall
:GoTest
:GoRun
:GoPath
:GoLint
:GoImport package_name
有疑问加站长微信联系(非本文作者)