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.

I've installed macvim via homebrew. This is working fine.

But when it commes to choose a default application for a new file type I cannot see MacVim. How can I set MacVim as the default application for a file type when it has been installed with homebrew?

Note: The question is not about how to select a default application in Finder, the question is how to set an application as default which is not listed in /Applications and there fore not shown by the Finder as a possible default application.

share|improve this question
    
Possibly relevant: apple.stackexchange.com/questions/7726/… –  echristopherson Sep 14 '12 at 20:39

4 Answers 4

up vote 8 down vote accepted

I had the same issue. I moved MacVim.app to /Applications and then symlinked into the homebrew cellar directory.

mv /usr/local/Cellar/macvim/7.3-65/MacVim.app /Applications/  
ln -s /Applications/MacVim.app /usr/local/Cellar/macvim/7.3-65/
share|improve this answer
    
Works perfect! Thanks a lot. –  BetaRide Sep 15 '12 at 15:01
1  
Doesn't this need to be repeated each time MacVim is upgraded? –  Eric Hu Mar 7 '13 at 9:51
1  
Worked for me. But mine was 7.3-66 which highlights @EricHu's concern... It suggests there is a better solution –  matt burns Nov 11 '13 at 15:55

You can set the default app from Finder.

  1. Select the file (e.g. foo.rb) and then choose 'Get Info' (command I, or File | Get Info).
  2. Open the 'Open with' section.
  3. Select your default app and then press 'Change All...'.
share|improve this answer
1  
That's just an other way of getting the same problem. Since MacVim has been installed using homebrew it's never listed in the list of applications. This is also true if I choose to see the atlernative list of applications. –  BetaRide Aug 22 '12 at 5:47

Try running brew linkapps. That's how you're supposed to do it, but it never works for me; if the same is true for you, do ln -s /usr/local/Cellar/macvim/7.3-64/MacVim.app /Applications (substituting the actual location of the app, if it differs on your system).

Homebrew should have told you that when you installed MacVim.

share|improve this answer
1  
Thanks for the answer. brew links did not help. I can see MacVim in the Launchpad and can open a file in finder now, but it's still not listed in the list of applications when I want it to set as the default application for .txt (or other file types). Adding the link doesn't work either. MacVim does get listed now, but when I choose MacVim finder grays out the open button. Somme how it's not sufficient to just sym link the MacVim.app. –  BetaRide Aug 25 '12 at 6:49
    
It works for me! The open button works too. My brew version is 0.9.5 –  Hai Feng Kao Oct 6 at 10:37

Correction: This is no longer the case, see https://github.com/Homebrew/homebrew/issues/8699

Note that brew linkapps puts links in ~/Applications, not /Applications. I had to follow the symlink (select your home directory from Favorites, select the Applications icon in the main pane, and click Open), then pull down the path list-box near the top of the dialog box (or hit Command+Up) to go one level back up the physical path. Then you can see the icon for the actual .app folder.

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.