Select text in any app, then search for it on any website in one keystroke with Quicksilver

While writing code, you might find yourself spending a lot of time searching for error messages on Stack Overflow or on your favorite search engine. With Quicksilver, you can speed up that process by creating a trigger that will allow you to select text, then initiate the search on a specific website with a keyboard shortcut. Here's how to set it all up.

1) Download Quicksilver and install it. If you already have it, please update to the latest version.

2) Open up Quicksilver's Preferences (via the keyboard shortcut ⌘, or via the Menu Bar icon, or via right-clicking on the Dock icon)

3) Click on Plugins at the top right, click on All Plugins on the left, then scroll all the way down and click on Web Search Module to install that plugin, as shown below:

Quicksilver Web Search Module

4) Click on Catalog at the top, then on Quicksilver on the left, and check the Proxy Objects source. Click the curved arrow button to rescan the catalog so that Quicksilver knows about this new source you added.

Quicksilver Proxy Objects

5) Click on the Preferences tab at the top, then click on Actions on the left, then search for find with and search for and make sure those two actions are present. If not, try quitting and restarting Quicksilver.

Quicksilver Actions

6) Open up Quicksilver's Preferences and go to Catalog, then click on Custom on the left. Click on the + button at the bottom and select Web Search List.

7) Click on the + button in the Web Search List info pane, and enter Stack Overflow for the Name, and*** for the URL. You should end up with something like this:

Quicksilver custom web search list

The way you determine what to enter in the URL field is by searching for anything directly on the site you want to create a custom trigger for, then looking at the resulting URL and replacing the search term with ***. For example, if you want to create a custom search trigger for Twitter instead of Stack Overflow, log in to your Twitter account in your favorite browser, then search for a keyword, such as monfresh. When Twitter displays the search results, the URL in your browser will be!/search/monfresh. Therefore, what you would enter in Quicksilver is!/search/***.

8) If you want to add more websites to your custom search list, just repeat Step 7 for each site. When you're done, close the Web Search List info pane by clicking the i button at the bottom, then click the curved arrow button (to the left of the i button) to rescan the catalog so that Quicksilver knows about the new sites you added to your search list.

9) Click on Triggers at the top, then click on the + button at the bottom and select Hot Key. When the sheet slides down, start typing Current until you see the Current Selection Proxy Object, then press the tab key to move to the Action pane. Start typing Find until you see Find With..., then tab to the Target pane. Start typing Stack Overflow until you see it, then click "Save".

Stack Overflow search in Quicksilver

10) Double-click on None under the Trigger column for your new custom trigger (or click the i button at the bottom). Click inside the Hot Key field (if it's not already flashing), then type in your desired keyboard shortcut, such as control-option-command-S.

Quicksilver Triggers

11) Test your new trigger by selecting any text (on this page for example), then typing your keyboard shortcut. The Stack Overflow website should open in your favorite browser and display the search results for the text you selected. Pretty cool, huh?

When you install the Web Search Module plugin, it adds 2 Web Searches (Full List and Simple) that you can enable in Catalog -> Plugins (if you don't see them, you might need to quit and relaunch Quicksilver). When you rescan the catalog, you'll notice the Full List contains over 500 entries, most of which you probably will never use. I also found that some of them (like Twitter) are out of date. I would recommend disabling the Full List and just adding your own as new entries to the custom Web Search List you created in Steps 6-8. You can leave the Simple List enabled as those are popular sites and most seem to be up to date.

Quicksilver Web Searches Catalog

In addition to searching for selected text, you will most often want to type a specific search term. The regular way to do that with Quicksilver is to invoke Quicksilver, then start typing the name of the site you want to search on, such as Wikipedia (which is included in the Simple List), then tab to the next pane and start typing Search for (or just sf), then tab to the third pane and type your search term, then press return. This should take you to the Wikipedia page for your search term, as seen in this screencast.

Once again, we can make that search faster by creating a custom trigger for invoking the Wikipedia search text entry field:

1) Open up Quicksilver's Preferences, then click on Triggers at the top, then click on the + button at the bottom and select Hot Key. When the sheet slides down, start typing Wikipedia until you see the search entry, then press the tab key to move to the Action pane. Start typing Search until you see Search For..., then tab to the Target pane. Delete any text that appears in the Target pane and click Save.

2) Assign a keyboard shortcut to this trigger, like you did in Step 10 earlier.

Now, whenever you type that keyboard shortcut, Quicksilver will open and all you have to do is type in your search term and hit return.

This is just a small sample of Quicksilver's power. I encourage you to read about more tips and tricks on the official Quicksilver blog.