Installing the Latest Version of Vim on CentOS5.7

Tadashi Shigeoka ·  Sat, December 3, 2011

I installed the latest version of Vim on CentOS5.7. (Vim version 7.3.364)

I was able to install it quickly by following this article.

・Reference: CentOS 5.5 に最新版の Vim をインストール - Vive Memor Mortis

■ Procedure

  1. Uninstall Vim installed via yum
  2. Get the latest source using mercurial
  3. Compile and install the obtained source

■ Shell script

#!/bin/sh
 
cd /usr/local/src
 
## Uninstall vim
yum remove -y vim-enhanced
 
## Install mercurial
yum install -y gcc python python-devel python-setuptools
easy_install mercurial
 
## Croning latest virsion of vim 
hg clone https://vim.googlecode.com/hg/ vim 
 
## Install Vim
cd vim 
yum install -y ncurses ncurses-devel
./configure --enable-multibyte --enable-xim --enable-fontset --disable-selinux --with-features=huge
make && make install

exit

■ Set Vim path

# vi ~/.bashrc
PATH="$PATH":/usr/local/bin/vim

Apply configuration immediately

# source ~/.bashrc

That’s all from the Gemba.


Reference Information

ITmedia エンタープライズ : Linux Tips「パスを追加したい~.bashrc編~」