Install gocode
kungfupanda · · 14239 次点击 · · 开始浏览1. D:\AWS_workspace\DAAS_Go>go get -u -ldflags -H=windowsgui github.com/nsf/gocode
2. Then gocode.exe will be installed in "D:\AWS_workspace\DAAS_Go\bin"
3. In Eclipse->Goclipse, set executable of gocode as this "D:\AWS_workspace\DAAS_Go\bin\gocode.exe".
See details in https://github.com/nsf/gocode
=============
http://hao.jobbole.com/gocode/
gocode是go语言自动补全守护程序
687474703a2f2f6e6f736d696c65666163652e72752f696d616765732f676f636f64652d73637265656e73686f742e706e67 687474703a2f2f6e6f736d696c65666163652e72752f696d616765732f656d6163732d676f636f64652e706e67
提供各种高级特性,目前包括
上下文敏感的自动补全
这个程序被称为守护进程是因为它使用了客户端服务器的架构,自动补全的速度特别快,热缓存的自动补全时间仅仅为30ms,几乎感觉不到。
使用
1, 首先你已经安装了go语言环境和设置了$GOPATH,保证你的 $PATH包含了 $GOPATH/bin
2 你需要一个合适的gocode版本, 6g/8g/5g的go编译器,你需要
go get -u github.com/nsf/gocode (-u flag for "update")
windows 用户需要
go get -u -ldflags -H=windowsgui github.com/nsf/gocode
3 下面要做的是和你使用的编辑器相关的了,
Vim
1 从$GOROOT/misc/vim目录中安装Go的vim脚本
2 安装gocode vim脚本
vim/update.sh
update.sh脚本干以下事情
当然你也可以使用symlink.sh来避免每次gocode升级后都要运行update.sh
symlink.sh 干以下事情
保证vim 开启了filetype插件, .vimrc中加上filetype plugin on就行了
现在就可以自动补全了 使用 <C-x><C-o> 开启自动补全
使用 Vundle
在你的 .vimrc 中加上
运行:PluginInstall
Emacs
1 安装 auto-complete-mode
2 从gocode 源文件中拷贝emacs/go-autocomplete.el到你的 emacs的 load-path 目录中
3 在你的.emacs 中加上
github网址https://github.com/nsf/gocode
==========================================
http://blog.csdn.net/patch/article/details/10126281
golang环境安装配置
go的安装比较简单,下载exe直接执行就可以
windows环境变量里的配置说下
GOROOT C:\Go
GOOS windows
GOARCH amd64
GOPATH D:\go\test
PATH 增加C:\Go\bin
安装msysgit
一路next,默认装到C:\msysgit\msysgit
安装gocode
运行msysgit安装目录下的git-cmd.bat,在打开的dos窗口运行
go get -u -ldflags -H=windowsgui github.com/nsf/gocode
会自动编译生成exe文件
gocode源码下载到D:\go\test\src
exe在D:\go\test\bin
将gocode.exe复制到C:\Go\bin
安装完成
有疑问加站长微信联系(非本文作者)
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
关注微信- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码` - 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传
收入到我管理的专栏 新建专栏
1. D:\AWS_workspace\DAAS_Go>go get -u -ldflags -H=windowsgui github.com/nsf/gocode
2. Then gocode.exe will be installed in "D:\AWS_workspace\DAAS_Go\bin"
3. In Eclipse->Goclipse, set executable of gocode as this "D:\AWS_workspace\DAAS_Go\bin\gocode.exe".
See details in https://github.com/nsf/gocode
=============
http://hao.jobbole.com/gocode/
gocode是go语言自动补全守护程序
687474703a2f2f6e6f736d696c65666163652e72752f696d616765732f676f636f64652d73637265656e73686f742e706e67 687474703a2f2f6e6f736d696c65666163652e72752f696d616765732f656d6163732d676f636f64652e706e67
提供各种高级特性,目前包括
上下文敏感的自动补全
这个程序被称为守护进程是因为它使用了客户端服务器的架构,自动补全的速度特别快,热缓存的自动补全时间仅仅为30ms,几乎感觉不到。
使用
1, 首先你已经安装了go语言环境和设置了$GOPATH,保证你的 $PATH包含了 $GOPATH/bin
2 你需要一个合适的gocode版本, 6g/8g/5g的go编译器,你需要
go get -u github.com/nsf/gocode (-u flag for "update")
windows 用户需要
go get -u -ldflags -H=windowsgui github.com/nsf/gocode
3 下面要做的是和你使用的编辑器相关的了,
Vim
1 从$GOROOT/misc/vim目录中安装Go的vim脚本
2 安装gocode vim脚本
vim/update.sh
update.sh脚本干以下事情
当然你也可以使用symlink.sh来避免每次gocode升级后都要运行update.sh
symlink.sh 干以下事情
保证vim 开启了filetype插件, .vimrc中加上filetype plugin on就行了
现在就可以自动补全了 使用 <C-x><C-o> 开启自动补全
使用 Vundle
在你的 .vimrc 中加上
运行:PluginInstall
Emacs
1 安装 auto-complete-mode
2 从gocode 源文件中拷贝emacs/go-autocomplete.el到你的 emacs的 load-path 目录中
3 在你的.emacs 中加上
github网址https://github.com/nsf/gocode
==========================================
http://blog.csdn.net/patch/article/details/10126281
golang环境安装配置
go的安装比较简单,下载exe直接执行就可以
windows环境变量里的配置说下
GOROOT C:\Go
GOOS windows
GOARCH amd64
GOPATH D:\go\test
PATH 增加C:\Go\bin
安装msysgit
一路next,默认装到C:\msysgit\msysgit
安装gocode
运行msysgit安装目录下的git-cmd.bat,在打开的dos窗口运行
go get -u -ldflags -H=windowsgui github.com/nsf/gocode
会自动编译生成exe文件
gocode源码下载到D:\go\test\src
exe在D:\go\test\bin
将gocode.exe复制到C:\Go\bin
安装完成