Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
1  
vi vs viM, intentional? –  akira Oct 5 '12 at 19:14
1  
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
add comment

2 Answers

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
1  
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
add comment
up vote 0 down vote accepted

After a lot of searching around this worked for me:

brew install https://raw.github.com/Homebrew/homebrew-dupes/master/vim.rb
share|improve this answer
add comment

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.