
Vim can be extended with Ruby and Python if it’s compiled with the +ruby and +python features. If you are using MacVim, you already have them, so you can continue using it happily. But the terminal Vim that comes with your OS X does not support them. Fortunately, we can fix that in less than 5 minutes.
The process is similar to what we described in Fixing the MacVim Cursor Bug on MBP Retina, but this time it’s for the terminal Vim.
If you are a Homebrew user, you can install a new version of Vim by typing the following commands in your terminal:
1 2 | |
If you want different compile options, you can fork the gist and customize it as you wish.
If you don’t use Homebrew, you can still compile it by your own. You need mercurial in order to clone the Vim repository. After that, everything is quite straightforward:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
Please note that we are installing Vim in /usr/local/bin, so it has to be
included in your PATH before /usr/bin, where the old terminal Vim is located. You can easily accomplish this by adding
the following line in your .bashrc or .zshrc:
1 2 3 | |
That’s it! Your Vim with Ruby & Python support is ready for some action.