$ yum install gcc make ncurses ncurses-devel
$ yum install ruby ruby-devel lua lua-devel luajit \
luajit-devel ctags git python python-devel \
python3 python3-devel tcl-devel \
perl perl-devel perl-ExtUtils-ParseXS \
perl-ExtUtils-XSpp perl-ExtUtils-CBuilder \
perl-ExtUtils-Embed
$ yum clean all
$ yum list installed | grep -i vim
vim-common.x86_64 2:7.4.160-1.el7 @base
vim-enhanced.x86_64 2:7.4.160-1.el7 @base
vim-minimal.x86_64 2:7.4.160-1.el7 @anaconda
$ yum remove vim-enhanced vim-common
Note: You do not need to remove vim-minimal because sudo depends on it.
Download vim source (it is better to get it from GitHub because you can get all the latest patches from there):
$ sudo cp -rv vim /usr/local/src/
$ cd /usr/local/src/vim/
Show the configuration options:
$ ./configure --help
Configure:
$ sudo ./configure --prefix=/usr --with-features=huge --enable-multibyte --enable-rubyinterp --enable-pythoninterp --enable-perlinterp --enable-luainterp
Build:
$ sudo make
$ sudo make install
re-hash the environment:
$ hash -r
(make sure you're in the src/vim directory)
Check vim version:
$ vim --version | cat
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 18 2017 16:53:32)
Included patches: 1-1203
https://gist.github.com/junhsieh/5b63a37510621e4868a05f254038d022 http://www.fullybaked.co.uk/articles/installing-latest-vim-on-centos-from-source