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 uninstalled brew and macports and reinstalled homebrew. I dont have vi under /usr/bin/ anymore. How can I fix this?

I tried using brew to install it but it says

Error: No available formula for vi
Apple distributes vi with OS X, you can find it in /usr/bin.
share|improve this question
vi vs viM, intentional? – akira Oct 5 '12 at 19:14
Did you delete it at some point? – slhck Oct 5 '12 at 19:52
/usr/bin/vi is just a symlink to vim in the same directory. – Daniel Beck Oct 5 '12 at 19:56
I didnt have vi or vim in /usr/bin – whistler Oct 7 '12 at 17:02

If you have Macports then use:

sudo port install vim

share|improve this answer
The OP said they uninstalled MacPorts and now use Homebrew, but that wouldn't bring back the system default vi – slhck Oct 5 '12 at 19:52
Actually they said, "I uninstalled brew and macports and reinstalled." Which, because of the bad use of commas could very well mean they had brew and macports and reinstalled them both. – Josiah Oct 5 '12 at 19:54
yeah, sorry about being unclear on that. Im using Homebrew now. – whistler Oct 7 '12 at 16:19
Okay, I searched my /usr/bin folder and found that vi is an alias to vim, as expected. So, now my question is, do you have VIM installed. Try to run that command. – Josiah Oct 7 '12 at 17:56
up vote 0 down vote accepted

After a lot of searching around this worked for me:

brew install
share|improve this answer

You must log in to answer this question.

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