VIM: Install latest VIM with Ruby and Python support


Here are the steps to install the latest version of VIM with Ruby and Python support.

Mac OSX
  • Install the latest Xcode from the AppStore.
  • Install homebrew.
$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
  • Install mercurial using homebrew.
$ brew install mercurial
Red Hat / CentOS
  • Install mercurial using yum.
$ yum -y install mercurial
  • Install the dependency rpms.
$ yum -y groupinstall 'Development Tools'
$ yum -y install ruby perl-devel python-devel ruby-devel perl-ExtUtils-Embed ncurses-devel
Clone and install VIM
  • Clone the vim repository using mercurial.
$ hg clone https://vim.googlecode.com/hg/ ~/vim
  • Now compile and install vim.
$ cd ~/vim
$ ./configure --prefix=/usr/local --enable-multibyte  --with-tlib=ncurses --enable-pythoninterp --enable-rubyinterp --with-ruby-command=/usr/bin/ruby --with-features=huge
$ make
$ sudo make install 
  • This will install the latest vim to /usr/local/bin.
  • Add the new vim version to your ~/.bashrc or ~/.zshrc.
export PATH=/usr/local/bin:$PATH
alias vi='/usr/local/bin/vim'

Ref: http://www.vimninjas.com/2012/09/21/vim-ruby-python

Email me when sivakalyanc publishes or recommends stories