How do I install MacVim on Mountain Lion? I want to get the MacVim application, as well as the new command-line vim.

I see there are several ways to do it (a snapshot from Google Code, via Homebrew), and if I use Homebrew, I see multiple options. What way will work best both for using the native application as well as using vim on the command line?

3 Answers 3


Here is the procedure I recommend, for those who are comfortable with the command-line and with Homebrew:

Install Homebrew.

Run the following on the command line (in Terminal):

brew install macvim --with-override-system-vim
brew linkapps

Edit your shell startup files to ensure that /usr/local/bin comes first in your $PATH.

If you use vim as $VISUAL or $EDITOR, add `export VISUAL='mvim -f' to your environment (details).

Check that you installed everything correctly by running

brew doctor

Now, you can run the graphical MacVim on a file by running mvim foo.txt from the command-line. Or, you can run the text-based editor by running vim foo.txt. Also, if other programs (e.g., git) fork off a separate editor, they'll run the graphical MacVim.

See also How to run mvim (MacVim) from Terminal? and Set macvim as default application after homebrew installation.


MacVim maintainer here.

It's an old question, but it deserves another answer for completeness: the new MacVim repo is located at github.com/macvim-dev/macvim, you can check the releases page there to download the most recent snapshot (old ones too). They're always compiled against the last version of OS X (I mean, I don't recompile the old snapshots to newer OS, but the current snapshot is always compiled against the current OS). Of course, you can also download the source and compile yourself or use homebrew as the accepted answer states.


It's pretty straightforward, just download the latest snapshot from GitHub and follow the instructions in the readme.txt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .