Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed Vim 7.4 on my MacBook using Homebrew. When I enter vim on the command line, it successfully enters Vim 7.4, but when I use vi I still get the old 7.3.

To install Vim 7.4 I used this command:

brew install vim --override-system-vi

When I do which:

$ which vi

When I execute this path in my shell /usr/local/bin/vi it does open 7.4. So I thought it might be an alias, but alias vi didn't find anything.

I'm quite puzzled by this and I have no idea why this happens. Does anyone know why this might be happening and how to fix it? I could of course make an alias of vi to vim but I wonder why it works the way it does right now.

share|improve this question
What does type vi tell you? – slhck Aug 12 '13 at 12:24
@slhck Thanks, that helped me! I found the problem now, see my answer. – rednaw Aug 12 '13 at 12:39
up vote 9 down vote accepted

Whenever you change paths, or install new binaries, you should always:

  • restart your shell, or
  • rehash the loaded binaries (e.g. in Bash with hash -r or Zsh with rehash)
share|improve this answer
hash -r worked for me, thanks – rednaw Aug 12 '13 at 12:44


  • Install XCode from the App Store
  • Run XCode and agree to the License Agreement on first-run

Then you can brew install vim --override-system-vi successfully. Then try running mvim -v or better yet aliasing vi and or vim to mvim -v in your ~/.bash_profile. It's an easy way out. Running plain mvim will launch a GUI vim, but with the -v flag you get to run in vim in the terminal.

share|improve this answer

I had a similar problem recently.

While using Git (eg. git commit), it calls system vim (vim 7.3 OS X 10.11), but that vim doesn't works well with my spf13-vim settings.

I tried these:

brew uninstall vim
brew install vim --override-system-vi --with-python3 --with-lua

and restart my shell. (I guess that's the problem in your case.)

then it works.

share|improve this answer

You must log in to answer this question.

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