Compiling Vim on Osx Maverick

I recently switch my linux machine for a mac. Of course, one of the first thing that I wanted to do was to install vim.

Since I want to use the latest version with the some features that aren’t included by default, I need to compile it. In my experience, compiling vim was always pretty easy and straight forward, however, I found out that it can be a little bit tricky on Osx Maverick.

Here is the way I could do it

First you need to download the latest release

  wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2

You then need to unpack it with a tar command

  tar xjf vim-7.4.tar.bz2

You then cd into the src directory

  cd vim74/src

You can now configure your vim installation, here is the configuration that I use.

Liquid error: No such file or directory - posix_spawnp

Normaly after you could just run

Liquid error: No such file or directory - posix_spawnp

Sadly, there is bug that prevent the compilation from working. I was getting this error relative to sigaltstack

Liquid error: No such file or directory - posix_spawnp

I found the fix on a mailing list You need to perform the following change to the os_unix.c file

Liquid error: No such file or directory - posix_spawnp

You should then be able to compile vim without any issues, enjoy!