vim configuration Solution for go language syntax highlighting problem
- 2020-06-15 09:13:42
- OfStack
Operating system: CentOS7.3.1611_x64
go version: go1.8.3 linux/amd64
vim version: version 7.4.160
The vim configuration go language syntax highlighting problem has been encountered several times, each time too much trouble to find, here is a summary.
Install git:
yum install git
Install vim - go:
cd ~
mkdir .vim
cd .vim
mkdir autoload plugged
cd plugged
git clone https://github.com/fatih/vim-go vim-go
cd autoload
wget https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Configure vimrc file:
[root@localhost ~]# cat ~/.vimrc
call plug#begin()
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
call plug#end()
let g:go_version_warning = 0
[root@localhost ~]#
If you find the above operation troublesome, you can use the compressed file here:
https://github.com/mike-zhang/mikeBlogEssays/tree/master/2018/other/20180123_vim_go
The details are as follows:
cd ~
tar zxvf vim.tar.gz
tar zxvf vimrc.tar.gz
Well, that's all. I hope it helped.
github address:
https: / / github com/mike - zhang/mikeBlogEssays/blob master / 2018/20180123 _vim configuration go syntax highlighting. rst
conclusion