Ask Different is a question and answer site for power users of Apple hardware and software. 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 used brew to install MacVim and it put it in /usr/local/Cellar/macvim/7.3-61/

I would like to be able to go to spotlight and type MacVim to launch the app. I tried creating a symlink in the Applications directory to /usr/local/Cellar/macvim/7.3-61/ But that doesn't seem to show up in Spotlight. I set the executable bits on the symlink. open from the command line works. How can I get MacVim to show up in Spotlight search?

share|improve this question
Spotlight doesen't look inside hidden folders and apparently doesen't work for aliases either. Do you use spotlight to launch apps? If so I must recomend I use it and its great. Faster than spotlight! – kevin9794 Aug 31 '11 at 2:25
Thanks. I installed alfred and added the MacVim folder to the search scope. Im in much better shape. – m_sharp Aug 31 '11 at 5:00
OK, I figured it out. If I make an alias to /usr/local/Cellar/macvim/7.3-61/, Spotlight will index it. For more on aliases, check out – m_sharp Aug 31 '11 at 5:07
Welcome to Ask Different! If you found a solution, please post it as an answer so it's easier for others with the same problem to see what helped. Please take a look at the FAQs for more info. Thanks. – Nathan Greenstein Nov 11 '11 at 23:10
To clarify @m_sharps's comment, it appears that Spotlight will index aliases, but not symbolic links (ln -s). – zourtney Aug 31 '12 at 15:55

In the Finder, press CommandShiftG for Go to the Folder. Type /usr/local/Cellar/macvim/7.3-61/ and press return. Select the file (actually a folder) Press CommandL for Make Alias. Depending on permissions, you may be prompted for an administrator password here.

Press CommandN to create a New Finder Window. Press CommandShiftA to go to the Applications folder in that window.

Drag the newly created alias from the window in which it was created to the window containing the Applications folder. Rename the alias so it no longer ends in " alias".

share|improve this answer
I followed your steps and MacVim shows up in spotlight. However when trying to launch MacVim from spotlight, I get an error message "Item MacVim is used by OS X and can't be opened". – m_sharp Dec 12 '11 at 5:32
Hmmm. How do you ordinarily launch MacVim when not using Spotlight? Do you get an error message then? – Daniel Dec 12 '11 at 6:26
Maybe spotlight can't launch it because it doesn't have the permissions to access /usr/local/ or something. – styfle Jan 12 '12 at 4:05
I got this to work by first changing the permissions on /usr/local/Cellar with 'sudo chflags nohidden /usr/local/Cellar' (I actually did this for /usr /usr/local and /usr/local/Cellar). Then I used Finder to create an alias for MacVim (the one in Cellar). Then I moved the alias to my Applications folder. Spotlight now finds MacVim (look at the bottom of its list until you open it once). – Chris Oct 18 '14 at 17:32
I also needed to do additional permission changes, by default, it appears the symlink was created without any execute permissions at all, adding those made the symlink appear in spotlight. Oddly enough, aliases I created and then renamed to something that didn't include the word "alias" at the end also weren't picked up by spotlight. Putting "alias" back at the end of the symlink name fixed it- – chrismarx Mar 16 '15 at 14:34

The way I've solved this is using a shell script and appify.

For example make a script with a text editor that contains



Then get appify -

Run appify on the shell script and it will make an application you can put in /Applications that will invoke MacVim. This will show up in spotlight.

share|improve this answer
If you're going to do it this way, just create an Automator app to run the script. – Slomojo Oct 25 '14 at 14:11
Yes @Slomojo, that proved to be the easiest approach. I created a shellscript that starts the App (in my case libreoffice) and put it in /usr/bin. Then I used automator to just invoke the script and saved the Automator created App in my Applications folder with the name I wanted to use in Spotlight. Absurd. – AlexAffe Jan 22 '15 at 12:42

To keep things nice and scriptable, you can use osascript to run a little AppleScript and create your alias automatically.

osascript <<END

  set macvim to POSIX file "/usr/local/Cellar/macvim/7.3-61/" 
  set applications_folder to POSIX file "/Applications"

  tell application "Finder"
    make alias file to macvim at applications_folder
  end tell

share|improve this answer
This actually worked, unlike many osascript one-liners I've found in various places. – thoughtadvances Dec 14 '14 at 10:14
I would recommend actually moving the MacVim app to Applications. Or installing it via brew cask. Aliases do index in spotlight, but they are ranked annoyingly low. – Slomojo Dec 14 '14 at 13:01
Thanks. I have noticed that it's hard to get Spotlight to choose my MacVim alias. – thoughtadvances Dec 14 '14 at 21:48

For those who use homebrew to install macvim (totally recommended)

Run the following after install

brew linkapps macvim
share|improve this answer

The alias method did not work for me. A better option is to use Automator to create an Application that runs a shell script:enter image description here

Also, linking directly to the in the Cellar directory like some of the other answers suggest binds you to a specific version. If brew upgrades MacVim, your link will still point to the old version. Rather, you should use:

open /usr/local/opt/macvim/ $@

as this location is automatically symlinked by brew to the most recent version.

This worked great for me. I save the Automator file in iCloud so I can conveniently add the app on other machines.

share|improve this answer

Sounds like you could do the following from the Terminal.

$ ln -s /usr/local/Cellar/macvim/7.3-61/ /Applications

You might have to use sudo to put the symlink in the /Applications directory.

share|improve this answer
Spotlight treats symlinks to "system files" as system files, so they aren't listed in normal results. Aliases are though. – user495470 Jan 17 '12 at 2:43
Any way to create an OS X alias programmatically in Bash? – Mathias Bynens Aug 16 '12 at 14:50
@MathiasBynens - see my answer, a little AppleScript will do it. – Slomojo Oct 25 '14 at 14:09

After trying several of the suggested solutions, the best thing that worked for me was to copy the app from the Homebrew Cellar to the applications directory:

cp -r /usr/local/Cellar/macvim/7.3-66/ /Applications/

Spotlight found it instantly.

share|improve this answer

Your Answer


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.