Getting gvim compiled under OS X

Getting gvim installed from source turned out to be harder than I was expecting. Because of that I figured I would share how I managed to get it finally to work so that nobody else has to go through the hassles I did in order to have a version of vim that is all patched.

  1. Fetch the vim code using Aap. That gets you the source, the latest patches, etc.
  2. Download some icons. For some reason the compile kept failing because vim couldn't find any icons for OS X. So I downloaded some that I liked.
  3. Edit your vim/src/main.aap file. Search for ``gui_mac.icns`` and replace it with ``app.icns``.
  4. Copy your app icons into vim/src.
  5. Build/install using Aap. Don't bother trying to set PREFIX as it seems the eventual path into /Applications is hard-coded somewhere.
  6. Copy some doc icons over. Copy the doc icons to /Applications/Vim.app/Contents/Resources/doc.icns .
  7. Update the vim runtime files. Best way is through Aap.
  8. Alias ``vim`` for your console. Set the alias to /Applications/Vim.app/Contents/MacOS/Vim .
The key thing in all of this is that (at least for me) the build couldn't find the icons for gvim and so I had to provide some and change their names. I tried uncommenting in the main.aap file the lines that said it would detect any icons I added, but I got Aap errors instead.