MacMost Now 147: Spotlight on Spotlight

Gary Rosenzweig takes a look at Spotlight, the search functionality built into Leopard. By using the quick keyboard shortcut and the Spotlight menu, you can quickly run applications, search for specific files and even look up dictionary definitions and do complex mathematical calculations.

Video Transcript
Hi this is Gary with macmost. Today, let's put the Spotlight on Spotlight.
So Spotlight gets a really bad rap. It's an extremely useful tool in Leopard. In Tiger it wasn't so great and then a long time ago its predecessor, Sherlock, was pretty bad. So let's take a look at Spotlight in Leopard and see how it can make so many tasks that you perform all the time much easier.
There are basically three ways to bring up Spotlight in the finder. The first is just hitting command F and then you get a Spotlight search window. You can also get here by using any finder window and typing in the little search box on the upper right, that converts the finder window to a Spotlight window and you can search for files here. For instance, search for test and it will give me results that either have test in the name or there's somehow the word test in the contents of the file.
But this isn't the most useful way to use Spotlight I find. Let's go and look at a completely different way. The third way to access Spotlight which is this little magnifying glass here at the top of the screen. You and you can go ahead and type in the word test and then you get all sorts of results. Or, a better way to do it is hit the keyboard combination command space, and this will bring it up just like you clicked on it. So you don't have to bring your cursor all the way over to the right side of the screen and then you could start typing. So you type the word test and then you get your results.
Now Spotlight gives you a lot more than just files results. Some of the most useful things Spotlight does is it gives you a dictionary definition right here. You can go ahead and click on that and it will bring up the dictionary application but of course you've also got a summary of that, right there in the Spotlight window. All you have to do is roll over it. You can also go ahead and navigate in this Spotlight window using arrow keys; so you can go ahead between any of one of these. So if you find a file that you want you can actually press return to open that file and its default application or you can have command return and it will open up the window with that file highlighted. When searching for something in Spotlight here's something really cool you can do. You can go ahead and specify, you only want to look at the name of the file by typing name, colon and then your search term. Now you're only going to get files that have that term in the name.
Now you can also add in something additional to that. Go back to searching for test and we only want to go ahead and look at a particular kind of file. We can type kind and then colon and then one of many different keywords, like text, it will only give us text files. Or if we want to find mail documents, we can look in mail and it will only give us results in mail sent or received. There's a whole list of them and I'm going to include a list of these keywords and some other information in the post for this video for this at macmost.com.
Now, you can also use the date functionality. Matter of fact you can even use the keyword today so you can find documents that have the word test associated with them that were created or modified today. You can even use created and you can type in date, like that, and it will only show files that were created today that have something to do with the word test.
One of the other things that you can do is use Boolean searching, in other words words like and, or, not. So for instance I can go ahead and look for test and microphone and I come up with a document called another test that I created today that has both those words in it. I have to capitalize and and you can also use or or not to search for things.
So here's a really good example of how to use Spotlight to do something easier than it would using the finder regularly. Say you want to go ahead and look at a font that you've got on your machine. Usually you have to go and find that font application go in there and find that specific font. But you don't have to do that if you Spotlight. So you just do command space to bring up this menu and you type in the name of the font and you're going to go ahead and get lots of hits including the font. So you just scroll down here to the font that you want, you see there's a lot of different ones that match Ariel, and if I hit return it will actually know enough to launch font book and bring up Ariel right there. So a much quicker way to get into fonts. And you can do this with lots of other applications as well.
Okay. Here's my current favorite use for Spotlight. It's launching an application. Say I want to launch an application and it's not in the doc and I'm not sure I'm I just need to type the name. I hit command space, bring up the Spotlight field and I type in the name of the app. Since the app name matches perfectly it is the top hit otherwise I could scroll up and down with the arrow key to get the exact thing I want to open, hit return and there I go. It launches the application. This is a lot faster than finding the app in the finder.
Here's another cool use. You can use Spotlight as a calculator. So instead of launching the calculator desktop app I can just type something in there and I actually get a little calculator result. 1 + 1 = 2. But I can do very complex things, like 5 x 5 + 6 and it will calculate that. I can even go ahead and use functions, like the square root of 9 or more complex things like the cosign of .5.

You can also make Spotlight more useful to you by tagging your files. So here's how you do that. Here's my documents folder and I select a file called another test. I do command guide to get information on that file and I get my basic information window which tells me things like the file size and all that. At the top something called Spotlight comments. I can go ahead and type anything I want in there like a tag. So I can create something called my tag and just leave it in there. So I close that now and now when I search in Spotlight for my tag it finds the file so I can add different tags to different files. For instance, if certain files are associated with a project I can add those tags in the comments. I can add more tags if a file's associated with more than one project and it can make it very easy for me to find these files using Spotlight later on. Of course, you can also adjust Spotlight slightly to your needs. Underneath all of the results in a Spotlight search is a Spotlight preferences which you can also access through your regular system of preferences if you like and it brings up the preferences windows. So you can do things like select which types of files you want represented. For instance you can be sick of seeing lots of music files when you don't want those you regularly search. You can uncheck that. You can also change the keyboard shortcut from command space to something else. And you can set some privacy restrictions up so if there's a certain folder you don't' want Spotlight returning searches for you can specify that as well.
So that's a really quick look at how incredibly useful Spotlight is in Leopard. And the key to making it very really useful is use the keyboard for everything. All the stuff I've showed you here can pretty much can be done with the keyboard. Command space, you type in something, you up and down with the arrow keys, you hit return, you do command return, you can do all these things with the keyboard. So if you're really good at using keyboard shortcuts, Spotlight is definitely for you. I'm going to post a list of some of the common little keywords and modifications that you can use in Spotlight to this post at macmost.com So if you're not watching this at macmost.com you may want to go there and look for Episode 147 of macmost.com.
Until next time this is Gary Rosenzweig.

As a companion to this video, here is a Spotlight quick reference list:
Default keyboard command to bring up Spotlight search field: Command+Space.
Using the “kind:” modifier, you can specify the kind of files to show. Some common ones are: app, contact, folder, email, event, todo, image, movie, audio, music, pdf, pref, bookmark, font.
You can also use the “date:”, “created:” and “modified:” modifiers with dates like 10/16/08. The “date:” modifier works with “date:today” as well.
You can use “name:” to specify that you only want items with those words in the name.
You can use quotes to exact phrasing, like “my file”.
You can use AND, OR or NOT in searches, but they must be captialized.
When you get a list of times, you can use the arrow keys to move down the list. Then use Return to open the file or application. Use Command+Return to open a Finder window with that file selected instead.
Here are some of the math functions you can use when using Spotlight as a calculator: sqrt, pow, ceil, floor, rint, exp, log, sin, cos, tan, asin, acos, atan.

Comments: 8 Responses to “MacMost Now 147: Spotlight on Spotlight”

    hippybear
    10/16/08 @ 1:43 pm

    Gary —

    GREAT episode on Spotlight. I had no idea it would do so many different operations — I’ve always used it to find things, but now I have a whole new set of tools to help!

    I do have one pet peeve in Spotlight, however. It is the NEVER ENDING list of Safari web history items whenever I do a search. I had hoped I could turn that off inside the Spotlight preference pane, but have not found that particular switch thus far.

    Do you maybe know how to turn off things inside Spotlight which are not one of the broad categories listed in the preference pane?

    Thanks for your knowledge!

    -Graham
    Cheney, WA

    10/16/08 @ 2:07 pm

    Graham: Turning off the “Webpages” option in the Spotlight prefs should filter out all those Web pages. It is a good idea. I think I’ll do that too.

    Ken
    10/16/08 @ 5:20 pm

    Gary

    Thank you. For months now I’ve been touting the new features of Leopards Spotlight but people can’t seem to past earlier versions. A couple of months ago I saw on Tekzilla a way to use the window key on pc’s to open applications fast. I wondered how I could do that on a Mac, and I found Spotlight. You don’t have to always spell out the full name of the app. I use it for iTunes, ter for Terminal time for QuickTime, 2005 for Quicken 2005 and disk for Disk Utility.

    Ken
    Napa, CA

    Daniel
    10/17/08 @ 3:22 am

    Well Done Gary!
    Thank you for adding “show notes” to your webpage! a great complement to a great podcast.
    Watch what we can do with Spotlight is great but having notes to copy and go over to learn the commands was a nice move.

    hippybear
    10/17/08 @ 10:43 pm

    rosenz:

    Actually, that “Webpages” checkbox is currently unchecked. And yet I still get the results. I don’t get them in the Spotlight menu, but I do get TONS of them when I pick “Show All.” I wish I could just turn that off completely.

    Do you get the same behavior on your machines? Maybe I have an uncooperative build.

    -Graham

    10/18/08 @ 7:42 am

    hippybear: Yes, it appears that Safari results will still show up in Search windows even if you have it unchecked. But they do not show up in the Spotlight menu. You can always clear your Safari History, or set the “Kind” to search for in the search window to only Documents or something like that.

    10/18/08 @ 2:36 pm

    I use spotlight a lot but I learned about new kind: options.
    Thanks.

    Lukas
    10/21/08 @ 5:38 am

    Hi Gary! I really enjoy your podcasts! Although I knew most of the Spotlight tricks already I just wanted to suggest one more “efficient” step while Spotliting, e.g. using ESC key to guickly erase the whole search field at once as oppose to pressing DEL key.
    Thought, it might be helpful! :-)
    Regards, Lukas
    Berlin, Germany

Comments Closed.