终于受不了LiteIDE函数定义的跳转,每次都需要等2-3秒。试了一下VSCode秒开的快感之后,果断换!但是VSCode也不是十全十美,需要配置一番!
1.输入下面的命令,避免自动提示出现PANIC(GO升级到1.7之后出现的bug)
gocode close
gocode -debug -s
2. cmd+shift+b to run go build -v .
task.json
{
"version": "0.1.0",
"command": "go",
"isShellCommand": true,
"showOutput": "always",
"echoCommand": true,
"tasks": [
{
"taskName": "build",
"args": [ "-v", "."],
"isBuildCommand": true
}
]
}
[https://github.com/Microsoft/vscode-go/wiki/Usage-FAQ]
3. cmd+shift+t to run go test -v .
keybindings.json
// 将键绑定放入此文件中以覆盖默认值
[
{ "key": "shift+space", "command": "editor.action.triggerSuggest",
"when": "editorHasCompletionItemProvider && editorTextFocus && !editorReadonly" },
{ "key": "shift+cmd+t", "command": "go.test.package" }
]
[https://github.com/Microsoft/vscode-go/blob/master/package.json#L79]
有疑问加站长微信联系(非本文作者)