Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save carlosipe/428c84def2543a07bc253f4729be449d to your computer and use it in GitHub Desktop.
Save carlosipe/428c84def2543a07bc253f4729be449d to your computer and use it in GitHub Desktop.
Install Vim with Ruby Interpreter and Command-T on Ubuntu

Summary

The following instructions will install Vim with the Ruby interpreter and Command-T. I keep my vim settings under revision control, thus I have chosen to use Git's submodules and Pathogen to manage Command-T. Depending on your preferences, you may want to setup Command-T differently. I recommend reading through the Command-T Readme

Install dependencies (what my system required), hg, and rake

sudo apt-get install ruby ruby-dev libncurses5-dev mercurial clone build-essential rake

I chose to compile vim with my system Ruby, 1.8.7. It is important that you use the same version to compile both Vim and Command-T. If your using RVM and you want to do the same, before proceeding you will want to:

rvm use system

Download and build Vim with Ruby

There are several configure options for Vim. Below, you can see what I have chosen. You can see all of the options with:

./configure --help

Once you have chosen your options:

hg clone https://vim.googlecode.com/hg/ vim
cd vim
./configure --with-features=huge --enable-rubyinterp --enable-pythoninterp --prefix=$HOME
make
sudo make install

Check for successful installation "+ruby"

vim --version | grep ruby
-python3 +quickfix +reltime -rightleft +ruby +scrollbind +signs +smartindent 

Command-T installation via git submodule and pathogen

cd ~/.vim    " If vim directory under git, you will want to be at the git root
git submodule add git://git.wincent.com/command-t.git bundle/command-t
git submodule init

Compile Command-T

cd ~/.vim/bundle/command-t
rake make

Generate helptags

:call pathogen#helptags()
@carlosipe
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment