Install vim from source on CentOS
To install vim from source on the CentOS server, run
yum -y install ncurses-devel
cd /usr/local/src
wget https://github.com/vim/vim/archive/master.zip
unzip master.zip
cd vim-master/src/
./configure
make
make install
This will install the latest version of Vim. You can start it with the command
vim
To get it work with “vi” command, i removed preinstalled vim editor with command
rpm -e --nodeps vim-minimal
Now create a symlink with
ln -s /usr/local/bin/vim /bin/vi