My machine came with Vim 7.3 and I just installed MacVim 7.4, so now I'm juggling both and I'm not sure how to manage the two. I'm plagued by questions like:

  • Should I remove the older version?
  • Where should MacVim be located?

Currently MacVim.app is in /Applications, and I see a couple executables at /Applications/MacVim.app/Contents/MacOS/MacVim and /Applications/MacVim.app/Contents/MacOS/Vim.

The pre-installed Vim 7.3 is sitting at /usr/bin/vim.

I'd like to be able to use 7.4 both from the terminal and in MacVim. I haven't installed MacVim's "mvim" script and not sure I will.

What is the best way to set this up?


You can set an alias for vim in your ~/.bashrc

alias vim=/Applications/MacVim.app/Contents/MacOS/Vim

With this the Bash will replace ´vim with/Applications/MacVim.app/Contents/MacOS/Vim`, when you type something like this:

vim ~/.bashrc

So you don't need to remove /usr/bin/vim, which is probably a bad idea anyway.

| improve this answer | |
  • Solved my dilemma and taught me how to set an alias :) – ivan Sep 15 '13 at 4:11
  • I just noticed that although setting the above alias did fix my problem, which vim still shows the older version use/bin/vim. Is that to do with the order of things in my $PATH? Should I do anything about that? – ivan Sep 18 '13 at 1:07
  • 1
    Have a look at unix.stackexchange.com/questions/85249/…. It explains the problem. It basically comes down to the fact that which only looks at $PATH and thinks like type look also at aliases. – Raphael Ahrens Sep 18 '13 at 4:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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