My new macbook came builtin with an “old”(er) version of vim which apparently was compiled without python and ruby. I want that.


Start by installing xcode, homebrew and git via <pre><code lang=”“bash””>$ brew install git</code></pre>

Installing custom formula

Now, since I want vim compiled with python and ruby support (for some plugins), I can not use

$ brew install vim

so I need a custom brew formula:

$ brew install

Tell shell to use correctly compiled vim

(By default) homebrew installs its programs in /usr/local/bin. But after installing vim via brew in the previous step, I still get this:

$ which vim

My solution to using the correct vim, was to prepend /usr/local/bin to $PATH instead of having it somewhere in the middle. Now my $PATH looks like this in my .zshrc:

export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin

and, as evidence:

$ which vim
$ vim --version | grep +ruby | echo $?
$ vim --version | grep +python | echo $?

Allright, we’re good to go!