vim on CentOS 7 is version 7.4 with patches 1-160:
$ vim --version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 21 2016 17:00:20) Included patches: 1-160
How to upgrade it to version 8 which is the latest major version?
Update on Oct 23 2018: the repository introduced in the original method is not available any more, you should not follow the method any more.
Check other packages, such as this one.
Or compile Vim by yourself. Checkout the source code at https://github.com/vim/vim by
git clone https://github.com/vim/vim
and build and install it by
1. make # to run configure, compile and link
2. make install # to do installation in /usr/local
By these commands on CentOS 7.
Add this repository:
# curl -L https://copr.fedorainfracloud.org/coprs/mcepl/vim8/repo/epel-7/mcepl-vim8-epel-7.repo -o /etc/yum.repos.d/mcepl-vim8-epel-7.repo
Upgrade Vim to vim 8:
# yum update vim*
After it is successful, your Vim should be version 8.0 now:
# vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Aug 2 2017 16:29:21) Included patches: 1-839