Wednesday, June 06, 2018

vim go plugin install

On MacOS

1. Make sure go in available, if not
brew install golang

2. Update vim
brew install vim

3. Install Vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

4. Install vim-go
git clone https://github.com/fatih/vim-go.git ~/.vim/plugins/vim-go

5. Modify ~/.vimrc, add the following line:
call vundle#begin('~/.vim/plugins')
     Plugin 'fatih/vim-go'
call vundle#end()

6. Initialize vim-go
:GoInstallBinaries





On Ubuntu, using vim-plug:
1. curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

2. git clone https://github.com/fatih/vim-go.git ~/.vim/plugged/vim-go

3. Add to ~/.vimrc
call plug#begin()
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
call plug#end()

4. Done.


Reference
https://github.com/fatih/vim-go
https://github.com/fatih/vim-go-tutorial
https://github.com/fatih/vim-go-tutorial#quick-setup

No comments: