Installing Vim With the Ruby Interpreter and Command-T on Ubuntu
I have been working on becoming more proficient in Vim. One of the processes that I have noticed that can take up a lot of time is switching between files. The two examples I have seen are NERD-Tree and Command-T. NERD-Tree looks great, however, I am primarily interested in opening files as quickly as possible. With this criteria, Command-T seems to be the best solution. There are other reasons I am interested in setting up NERD-Tree, but that is for another day.
Here is a quick example of why I chose Command-T. Previously, I would open and switch files like so:
1 2 3 4 5 6 | |
With Command-T, this process is simplified to:
1 2 3 | |
I have set my leader key to a comma, thus ‘,t’ opens Command-T for me. I can then type letters that appear in the file path, a=app, v=view, and so forth. Amazingly much faster.
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
1
| |
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 tell RVM to use your system Ruby.
1
| |
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:
1
| |
Once you have chosen your options:
1 2 3 4 5 | |
Check for successful installation “+ruby”
1 2 | |
Command-T installation via git submodule and pathogen
If your Vim directory is under git, you will want to be at the git root
1 2 3 | |
Compile Command-T
1 2 | |
Generate helptags in Vim
1
| |
You should be all set! If you run into any troubles, please let me know if the comments.
Comments