http://icsmile.com/2016/03/31/centos7_go1.6/
在CentOS7下安装golang1.6版本,并进行vim高亮配置
由于个人喜好,我的工作目录都在opt下,故设置golang的工作目录为/opt/golang
mkdir /opt/golang vim ~/.bash_profile export GOPATH=/opt/golang export GOROOT=/root/golang export PATH=$PATH:$GOROOT/bin 重载环境变量 source ~/.bash_profile 确认版本 go version #go version go1.6 linux/amd64以下是我的配置环境,仅供参考
vim ~/.vimrc set nocompatible " be iMproved, required filetype off " required set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'gmarik/Vundle.vim' Plugin 'fatih/vim-go' call vundle#end() " required filetype plugin indent on " required syntax on 安装vim-go git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go