UPDATE: The newest release of MacVim has a preference pane that lets you "Launch Vim processes in a login shell." If turned on, it should solve the PATH problem suffered by some Vim users.
If you use
Vim for OS X or the nascent
MacVim, you may have noticed that
- your PATH is not set correctly (i.e., compilations fail) and
- Vim is not associated with all of your text files (i.e., it doesn't show up in the "Open With" context menu)
A while ago, I realized that the
gvim.app available for
download from the OS X Vim site had the potential to solve both of these problems, and so I hacked it to produce:
- gvim.app (for Vim for OS X) and
- mvim.app (for MacVim; maybe unneeded if "Launch ... login shell" preference turned on)
To install one of these files, download the archive, unzip it, and move the application into your
/Applications folder. If you start Vim from that application, it will open as usual but will have the
PATH set as if you were in the Terminal (i.e., it executes a
bash login before
exec'ing Vim). You should also notice that the new launcher application shows up in your "Open With" menus. Finally, if you put the launcher in your Dock, you can use it to generate new Vim windows, even if Vim is already open.