uncategorized

Go-Vim-IDE

install vim with lua support

1
> brew install vim --with-lua --override-system-vim

确定lua安装成功,中间可能会出现”/usr/local/lib is not writable”错误,可以通过如下命令解决:

1
> sudo chown -R $(whoami) /usr/local/lib/

或者使用sudo安装

install ctag for go compatible tag generato

1
> brew install gotags

install vim-go

1
2
> git clone git@github.com:farazdagi/vim-go-ide.git ~/.vim_go_runtime
> sh ~/.vim_go_runtime/bin/install

install go.tools Binaries

1
2
> vim ~/.vimrc
## execute :GoInstallBinaries

install vim-pathogen plugin

1
2
3
4
5
6
> mkdir -p ~/.vim/autoload ~/.vim/bundle && curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
> cat << EOF >> ~/.vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
EOF

intall neocomplete plugin

1
2
3
4
> cd ~/.vim/bundle && git clone https://github.com/Shougo/neocomplete.vim.git
> cat << EOF >> ~/.vimrc
let g:neocomplete#enable_at_startup = 1
EOF

run

1
vim -u ~/.vimrc.go