vim配置go语言语法高亮问题的解决方法

栏目: 编程语言 · Go · 发布时间: 8年前

内容简介:vim配置go语言语法高亮的问题已经遇到过好几次了,每次都是找不到答案,今天小编给大家带来了vim配置go语言语法高亮问题的解决方法,感兴趣的朋友一起看看吧

操作系统 : CentOS7.3.1611_x64

go 版本 : go1.8.3 linux/amd64

vim版本 :version 7.4.160

vim配置 go 语言语法高亮的问题已经遇到过好几次了,每次都去查找太麻烦,这里总结下。

安装git:

yum install git

安装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

配置vimrc文件:

[root@localhost ~]# cat ~/.vimrc
call plug#begin()
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
call plug#end()
let g:go_version_warning = 0
[root@localhost ~]#

如果觉得上面的操作比较麻烦,可以使用这里的压缩文件:

https://github.com/mike-zhang/mikeBlogEssays/tree/master/2018/other/20180123_vim_go

具体如下:

cd ~
tar zxvf vim.tar.gz
tar zxvf vimrc.tar.gz

好,就这些了,希望对你有帮助。

本文github地址:

https://github.com/mike-zhang/mikeBlogEssays/blob/master/2018/ 20180123_vim配置go语法高亮.rst


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。

The Information

The Information

James Gleick / Vintage / 2012-3-6 / USD 16.95

James Gleick, the author of the best sellers Chaos and Genius, now brings us a work just as astonishing and masterly: a revelatory chronicle and meditation that shows how information has become th......一起来看看 《The Information》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

在线进制转换器
在线进制转换器

各进制数互转换器

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具