Tuesday, September 22, 2009

Getting the gvim + It's All Text! experience on OS X

Firefox remains my browser of choice across most platforms because I highly value the functionality afforded by two particular extensions (I even have these installed along with a PortableApps version of the browser):
Under OS X, I hadn't been too happy with the latter extension, because I couldn't figure out how to use vim as my text editor. On asyd's blog, I encountered a method of achieving vim integration with IAT!. This was a very clever work-around, but it didn't provide the consistent user experience that I have come to expect after using gvim on my Linux and Windows boxen.

However, during a moment of sleep-deprived clarity, I encountered MacVim. This, coupled with the following steps addressed my grievances quite nicely!

(I'm trying to be a "good blogger", and mentioning almost all of the steps here -- even those I consider to be somewhat obvious):
1. Download the MacVim port from http://code.google.com/p/macvim/
2. Extract the *.tbz archive (Yes, double-clicking works just fine.)
3. Copy/Move  MacVim.app where you desire (e.g. /Applications)
4. Similarly, put the mvim script where you desire (e.g /usr/bin) [helps to use a terminal here so you can verify that ownership and permissions are sane]
5. Recommended: symlink gvim to point to mvim (particularly useful if you are a multi-platform type and don't feel like remembering to type something different when you happen to be on your Mac). [It is also useful to tell the mvim script where your MacVim.app is, but I'll leave this one as an exercise for the reader, because it is generally not strictly necessary...]
6. Configure the preference for It’s All Text! and tell it to use mvim (e.g. /usr/bin/mvim) as its editor.
7. Enjoy...

No comments: