Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 19 down vote accepted

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 --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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.