That Pesky Git Error Message
If you are using git on OSX, then you have undoubtedly run into this error message at one point or another:
”.git/COMMIT_EDITMSG” 69L, 2767C written
error: There was a problem with the editor 'vim'.
Please supply the message using either -m or -F option. This happens when you do a git commit but accidentally type :Wq when you attempt to write the file. It then bitches that you didn’t type a valid command and so you type the correct command, :wq, only to be greeted by this message in the terminal. You do have MacVim installed though, right? If not, install it through homebrew (brew install macvim) or go here and grab it from the website: http://code.google.com/p/macvim/. Be sure to put mvim in your path so you can launch it from the command line.
With MacVim all set up, correcting this issue is actually very simple. All you need to do is symlink vim to mvim and you will never see the error again. I put mvim in
/usr/local/bin, so to create the symlink I typed: ln -s /usr/local/bin/mvim /usr/local/bin/vim You can put it anywhere you want as long as it is before /usr/bin/vim in your path.