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 used brew to install MacVim and it put it in /usr/local/Cellar/macvim/7.3-61/MacVim.app

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/MacVim.app. But that doesn't seem to show up in Spotlight. I set the executable bits on the symlink. open MacVim.app from the command line works. How can I get MacVim to show up in Spotlight search?

share|improve this question
1  
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 alfredapp.com. 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
2  
OK, I figured it out. If I make an alias to /usr/local/Cellar/macvim/7.3-61/MacVim.app, Spotlight will index it. For more on aliases, check out switchingtomac.com/tutorials/creating-aliases-in-mac-os-x –  m_sharp Aug 31 '11 at 5:07
    
So it seems Spotlight does index aliases! Haha sweet. Anyhow I'm glad you liked Alfred and its great you figured how to add things to spotlight too. –  kevin9794 Aug 31 '11 at 23:43
2  
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

4 Answers 4

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) MacVim.app 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
2  
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 Lawson 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 yesterday

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

For example make a script with a text editor that contains

#!/bin/bash

/usr/local/Cellar/macvim/7.3-61/MacVim.app

Then get appify - http://git.abackstrom.com/appify.git

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

Sounds like you could do the following from the Terminal.

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

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

share|improve this answer
1  
Spotlight treats symlinks to "system files" as system files, so they aren't listed in normal results. Aliases are though. –  Lri 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

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/MacVim.app /Applications/

Spotlight found it instantly.

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.