Upgrading vim on Mac OSX Yosemite via brew
That way I got the latest vim version (7.4.x) to work with on the command line. But when MacVim stopped working, I had to go back to vim 7.3.x which was previously installed. That had been, unfortunately, compiled without the options to copy between vim and the system clipboard. (i.e. by copying into the + register with command mode “+y). There began my search for finding out a way to upgrade the command line vim version. I already had brew installed. So I did a:
brew install vim
But I got an error that the file http://ftp.debian.org/debian/pool/main/v/vim/vim_7.4.273.orig.tar.gz was not found. I followed that path upto debian/pool/main/v/vim and discovered that the file had been updated. It was version 7.4.488 now. I ran a brew update but that got me nowhere. I wondered if I could manually edit the brew Formula to look for a different file. First I downloaded the latest vim_7.4.488.orig.tar.gz from the debian ftp and got its sha code. Then I edited the vim brew formula.
In the vim.rb file, lines 7 and 8 became:
Then on running brew install vim, it downloaded the latest file, installed it, and got me a cool vim version 7.4.x to work on.
p.s. If your MacVim stopped working, you can try to remove your current MacVim.app in your Applications folder and then install in again via brew:
brew install macvim
Then you’ll have to add a link to the Applications folder by following the instructions in case the previous brew install worked fine:
Now your MacVim.app should be sitting in your Applications folder and ready to use.