商务合作加Q:411239339

CentOS 6 64位系统中编译安装vim8

浏览:628次阅读
没有评论

共计 1348 个字符,预计需要花费 4 分钟才能阅读完成。

VIM8 发布也很长一段时间了,目前基本趋于稳定,刚好最近也在学习 go,对于 go 的语法支持插件需要 vim8,而我用的 CentOS 6 中 VIM 版本为 7.4, 果断开始折腾。

1、下载 vim8 源码

mkdir /opt/vim8
cd /opt/vim8
git clone https://github.com/vim/vim.git

2、编译 vim8

废话不多说,看操作:

cd /opt/vim8/vim
# 需要 python3 的支持,这里我们安装 epel 源,同时安装 python34 和 ruby 开发包
yum install epel-release -y
yum install python34 python34-devel
# 开始编译 vim
./configure --prefix=/usr/local/vim8 \
--with-features=huge \
--enable-multibyte \
--enable-rubyinterp=yes \
--enable-pythoninterp=yes \
--with-python-config-dir=/usr/lib64/python2.6/config \
--enable-python3interp=yes \
--with-python3-config-dir=/usr/lib64/python3.4/config-3.4m \
--enable-luainterp=yes \
--enable-gui=gtk2 \
--with-ruby-command=$(which ruby) \
--enable-cscope
# 编译
make
# 安装
make install

3、配置 8

治病还是得看操作:

# 添加环境变量至 /etc/profile,最后一行添加
export PATH=/usr/local/vim8/bin:$PATH
# 安装 vundle.vim 插件,用于安装 go 插件
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
添加~/.vimrc 文件,内容如下:
syntax on
set nu
"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'
" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
set softtabstop=4
开始安装插件,命令模式下输入 PluginInstall,即可自动安装完成

CentOS 6 64 位系统中编译安装 vim8

3、测试 go 插件

编写一个简单的 hello world,颜色也漂亮了

CentOS 6 64 位系统中编译安装 vim8

正文完
扫码赞助
post-qrcode
 0
果子
版权声明:本站原创文章,由 果子 于2020-06-25发表,共计1348字。
转载说明:除特殊说明外本站文章皆由果较瘦原创发布,转载请注明出处。