【问题标题】:How do I get rid of this message in Vim when I'm working with golang files with Janus vim?当我使用 Janus vim 处理 golang 文件时,如何在 Vim 中消除此消息?
【发布时间】:2015-04-03 05:45:31
【问题描述】:

我使用 Vim 打开一个 hello.go 文件(使用 janus vim distro 附带的 nerdTree 插件)并得到“vim-go: could not find 'gotags'. Run :GoInstallBinaries to fix it.”。我正在使用gvm。我可以让 golang 与 gvm 一起运行。如何使用 gvm 安装 GoInstallBinaries 以消除此消息?我对 golang 还很陌生,所以我只是想启动并运行。

【问题讨论】:

  • 你需要在 vim 中输入(虽然是命令模式):GoInstallBinaries,然后按回车键。上次我这样做时,至少有一个依赖项已经移动,我需要手动安装它。
  • @sberry - 考虑将您的评论转换为答案,因为它似乎是一个。
  • @sberry 我创建了 $GOPATH 作为 export GOPATH="$HOME/workspace" 并且当我这样做 :GoInstallBinaries 我得到“vim-go: go executable not found”

标签: vim go vim-plugin gvm


【解决方案1】:

照 sberry 所说的去做。在命令模式下,点击 : 并输入 GoInstallBinaries,然后回车。这应该会安装所有东西。

【讨论】:

  • 我创建了 $GOPATH 作为 export GOPATH="$HOME/workspace" 并且当我这样做 :GoInstallBinaries 我得到“vim-go: go executable not found”
  • 在这种情况下您可能没有正确安装 Go,或者您的 GOROOT 环境变量未设置。
猜你喜欢
  • 2011-06-02
  • 1970-01-01
  • 2021-01-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-12-06
  • 2010-12-08
  • 1970-01-01
相关资源
最近更新 更多