Sooo...
I thought it would be easier to setup goimports to use it with vim, and probably it is, but I had a lot of problems on the way.
Here's a quick summary of what I did at the end.
Note: I already had go installed and my GOPATH envrionment variable set.
-
If fish shell is the default shell change it to something else ( I reverted to bash)
chsh -s /bin/bash
-
Install Pathogen.vim
cd ~/.vim mkdir autoload bundle #copy the pathogen.vim file in autoload
-
Install vim-go
git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go
-
Add these lines to the top of the
~/.vimrc
file:execute pathogen#infect() let g:go_fmt_command = "goimports"
-
Open vim y run:
:GoInstallBinaries
And that was it!
Have I know this before I would've save a lot of time.