1. 执行以下命令,下载vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
2. 将以下内容保存到~/.vimrc文件中
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'fatih/vim-go'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
3. 进入vim,执行:PluginInstall,安装vim-go,安装完后在屏幕的左下角会显示“Done”
4. 然后在执行:GoInstallBinaries,等待即可
有疑问加站长微信联系(非本文作者)