Skip to content

FAQ Troubleshooting

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

Not an editor command

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

filetype plugin indent on

Command not found

If trying to use :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