查看偏移值
go的自动补全靠的时gocode,我们可以gocode -debug查看偏移,自动补全正常时偏移小于1ms,设置为on时偏移有3秒
gocode -debug
- 如果大于1秒 表示有问题
解决办法
https://github.com/nsf/gocode 中有说明
You should have a correctly installed Go compiler environment and
your personal workspace ($GOPATH). If you have no idea
what $GOPATH is, take a look here
(http://golang.org/doc/code.html). Please make sure that
your $GOPATH/bin is available in your $PATH. This is
important, because most editors assume that gocode binary is
available in one of the directories, specified by
your $PATH environment variable. Otherwise manually copy
the gocode binary from $GOPATH/bin to a location which is
part of your $PATH after getting it in step 2.
- 及把 G O P A T H / b i n 中 的 g o c o d e . e x e 复 制 到 了 GOPATH/bin中的gocode.exe复制到了 GOPATH/bin中的gocode.exe复制到了GOPATH中
cp -rf $GOPATH/bin/gocode.exe $GOPATH/gocode.exe