VIM7.4升级(for vim-go)

[操作系统]
安装时选用的CentOS版本:CentOS-7-x86_64-Minimal-1708

[root@zbs-client vim-7.4.2367]# uname -a
Linux zbs-client 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

[root@zbs-client vim-7.4.2367]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

[vim-go对VIM的版本要求]
vim-go requires Vim 7.4.2009 or Neovim, but you’re using an older version. Please update your Vim for the best vim-go experience.

[更新VIM]
1. 载必要组件
[root@zbs-client ~]# yum install -y gcc gcc-c++ ruby ruby-devel lua lua-devel \
ctags git python python-devel \
tcl-devel ncurses-devel \
perl perl-devel perl-ExtUtils-ParseXS \
perl-ExtUtils-CBuilder \
perl-ExtUtils-Embed

  1. 下载源码:
    https://github.com/vim/vim/archive/v7.4.2367.tar.gz

  2. 安装VIM:
    [root@zbs-client ~]# tar zxvf vim-7.4.2367.tar.gz
    [root@zbs-client ~]# cd vim-7.4.2367
    [root@zbs-client vim-7.4.2367]# ./configure –with-features=huge \
    –enable-multibyte \
    –enable-rubyinterp=yes \
    –enable-pythoninterp=yes \
    –with-python-config-dir=/usr/lib64/python2.7/config \
    –enable-perlinterp=yes \
    –enable-luainterp=yes \
    –enable-cscope \
    –prefix=/usr/local
    [root@zbs-client vim-7.4.2367]# make
    [root@zbs-client vim-7.4.2367]# make install

  3. 查看版本号:
    [root@zbs-client vim-7.4.2367]# vim –version
    VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 5 2018 17:19:11)
    包含补丁: 1-2367

你可能感兴趣的:(Linux,科普)