I was doing some work on a virtual machine that’s running CentOS 5.7 and wanted to run vim with my existing .vimrc file and plugins.
By default, vim isn’t installed. I’d tried to install it from the repos though, so running
vi --version told me that I was running
VIM - Vi IMproved 7.0 (2006 May 7), which is a bit old for me. I need to be running at least version 7.3 with +python and +ruby support for extensions.
Grab the source code:
$ wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2
Extract from the archive
$ tar xvjf vim-7.3.tar.bz2 && cd vim73
Configure, disabling selinux and enabling ruby support.
$ ./configure --disable-selinux --enable-rubyinterp --with-features=big
Make the binary and install it
$ make && sudo make install
Check your current version:
$ vim --version
You should get something similar to
VIM - Vi IMproved 7.3 (2010 Aug 15).
Congrats! You just installed Vim 7.3 on CentOS 5.7
Michael is a polyglot software engineer, committed to reducing complexity in systems and making them more predictable. Working with a variety of languages and tools, he shares his technical expertise to audiences all around the world at user groups and conferences. You can follow @mheap on Twitter