apt-get remove --purge vim
add-apt-repository ppa:jonathonf/vim
apt update
apt install -u vim
私有仓库自动忽略验证
设置GOPRIVATE来跳过私有库,比如常用的Gitlab或Gitee,中间使用逗号分隔:
goenv-w GOPRIVATE=*.gitlab.com,*.gitee.com
私有库忽略验证:
go env -w GOSUMDB=off
国内验证:
go env -w GOSUMDB="sum.golang.google.cn"
安装vim-go
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go
将以下内容复制到 ~/.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()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'fatih/vim-go'
Plugin 'Valloric/YouCompleteme'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
在vim命令模式下输入PluginInstall
在vim命令模式下输入GoInstallBinaries安装一些vim-go插件所需要的一些工具,这些工具会被放到$GOBIN目录下