I use a lot of different editors (BBEdit, TextMate, Coda, Espresso – I know I know kind of a weakness of mine) but I also like using vi a lot as well. One thing that is missing on the Mac install however is the ability to launch the GUI version of vi from the command line. Here is how to set this up.
1. Grab the gvim script from http://macvim.org/OSX/files/gvim and save the file locally as gvim (ignore the extensions).
2. Move the file to your active bin, try /bin on your system.
3. Make sure you make the file executable
$ chmod 555 gvim
4. And for good measure you can turn over ownership to root
$ chown root:wheel gvim
5. Close your terminal and open it again to initiate your changes and now you can launch the gui version of vi from your command line.
$ gvim newfile.txt

