Skip to content

FAQ Troubleshooting

Fatih Arslan edited this page May 29, 2015 · 9 revisions

Why another plugin?

This plugin/package is born mainly from frustration. I had to re-install my Vim plugins and especially for Go I had to install a lot of separate different plugins, setup the necessary binaries to make them work together and hope not to lose them again. Lots of plugins out there lack proper settings. This plugin is improved and contains all my fixes/changes that I'm using for months under heavy go development environment.

Give it a try. I hope you like it. Feel free to contribute to the project.

I get "not an editor command" error when I invoke :GoXXX

This happens if vim-go is not installed properly. Be sure you have added this line into your .vimrc:

filetype plugin indent on

I get a "command not found" error when I invoke :GoXXX

If you try to call :GoDef, :GoInfo and get a command not found, check that you have the binaries installed by using: :GoInstallBinaries

Before opening vim, check your current $PATH:

echo $PATH

after opening vim, run :echo $PATH, the output must be your current $PATH + $GOPATH/bin (the location where :GoInstallBinaries installed the binaries

If problem persists and you are using maybe 'csh' or other shell, try adding this to your .vimrc:

set shell=/bin/sh

I'm using Fish shell but have some problems using Vim-go

First environment variables in Fish are applied differently, it should be like:

set -x GOPATH /your/own/gopath

Second, Vim needs a POSIX compatible shell (more info here: https://github.com/dag/vim-fish#teach-a-vim-to-fish). If you use Fish to open vim, it will make certain shell based commands fail (means vim-go will fail too). To overcome this problem change the default shell by adding the following into your .vimrc (on the top of the file):

if $SHELL =~ 'fish'
  set shell='/bin/sh'
endif

or

set shell='/bin/sh'
Clone this wiki locally