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.


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/
  • 1
    Doesn't this need to be repeated each time MacVim is upgraded? – Eric Hu Mar 7 '13 at 9:51
  • 2
    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
  • 2
    I made easier without moving - only link: ln -s /usr/local/Cellar/macvim/8.0-130/MacVim.app/ /Applications/MacVim.app - but yes looks like link must be upgraded after changing the version of installed MacVim - because the path to the source folder will be changed. – Vitaly Zdanevich May 30 '17 at 6:58

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.

  • It actually put the link in /Applications for me. The behavior must have changed. – Brian McCutchon Oct 10 '15 at 2:05

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...'.
  • 2
    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.

  • 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 '14 at 10:37
  • 1
    brew linkapps is no longer supported. – zhon Sep 4 at 7:41

You must log in to answer this question.

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