-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
FAQ Troubleshooting
This happens if vim-go is not installed properly. Be sure you have added this line into your .vimrc
:
filetype plugin indent on
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
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'