Firefox Quick Searches with Smart Keywords
Short URL for this post: http://plp.me/dA553Q
One thing I've never understood about Firefox users is how they use Firefox's buit-in search box. It's a nice feature and it's extendable, I'll give you that, but I find there is something so much more powerful and convenient also built into Firefox that doesn't get the credit it deserves: Quick Searches (or Smart Keywords). It's not even mentioned on the Firefox Features page! The idea of quick searches is relatively simple. It's a bookmark with a keyword. You use that keyword to access the bookmark. You can add parameters to your keyword in such a way that Firefox will replace a given string in the bookmark's URL with your parameter, therefore making it a powerful GET URL shortcut.
With the recent addition of the Awesome Bar (or Smart Location Bar) since Firefox 3, the location bar has become the place where most power users will type their queries in. Why use another box to query specific search engines/sites? You can access the location bar effortlessly with F6 or with a mouse click, so why would you bother with a whole other bar for the same purposes as the main one?
Here's how to create a Firefox Quick Search bookmark.
Method #1 - The manual one (so you understand what you're doing!)

Firefox Bookmark Folder Creation
First, I suggest you create a 'Quick Searches' bookmark for the sake of clarity. It's simple enough to do so: in your menu bar, click 'Bookmarks' then 'Organize Bookmarks'. Once the Bookmark Organizer window comes up, right click on 'Bookmark Menu' and select 'New Folder'. Name it whatever you want; I use 'Quick Searches' with a self-explanatory description that reads 'Firefox Quick Searches'. Once that's done, we're set to start adding our shortcuts, and this is where you realize the potential of this feature. Say you want to make a shortcut for a Google search, which is something everyone uses dozens of times a day. First, go to the regular Google site and perform a search for a simple word, like "test". You'll be directed to the results page with an URL that looks like this: http://www.google.ca/search?hl=en&q=test&btnG=Google+Search&meta=. You need some very basic understanding of URLs at this point. Everything after the "?" symbol is called a query string. Every item is divided in key/value pairs and separated by an ampersand (&). So we have the "hl" key that is set to "en", the "q" key set to "test", and so on. What interests us here is the "q" (query) key and its value. Obviously you've noticed that the value is set to that of your Google query, and it may be URL encoded (spaces replaced by "+" and such). Copy the URL, and get back to the Firefox Bookmark Organizer.

Firefox Quick Search Bookmark
In the Bookmark Organizer, in your newly created folder, create a new bookmark. In the window that opens, enter "Google" as name and paste the URL you got from your Google search in the "Location" field. All we need to do then is edit the URL a bit. I've shortened it to http://www.google.ca/search?hl=en&q=test because I know Google doesn't need the btnG and meta keys in order to perform a search. All that's left to do then is replace your initial query ("test") with the magic string "%s". Basically, that will tell Firefox to replace "%s" with whatever you're passing to the keywords. Set a short keyword, like "g" or "gg", enter an optional description and click "Add". That's it, you just added a quick search to Firefox. Now in order to use it, just write the keyword in the location bar followed by your query "g Firefox" and it will take you directly to Google's search results for your arguments!
That was easy, wasn't it?
Method #2 - The lazy one

Smart Keyword Context Menu
There's another convenient way to add Firefox quick searches. When you come across a search box you can right click on it and select "Add a keyword for this search". A dialog will pop up asking you to provide a name and keyword for the new Quick Search. Once you do that, your new Quick Search should be accessible the same manner as the manual creation example, using your keyword in the location bar.
So isn't that better than clicking away from the location bar, selecting the search engine you want to use and writing your query there? All you have to do is clear the location bar and type "g query" and you're at the result page of Google. I find that much more productive than its alternatives. Oh, and don't forget to get rid of the Search Box that now uselessly clutters your Firefox GUI
Here are a few good-to-have Firefox Quick Searches (Right click and "Bookmark This Link" or right click in the text box and select "Add keyword for this search" to save):
- YouTube (keyword: yt)
- PHP Manual (keyword: php)
- Ubuntu Jaunty Packages (keyword: apt)
- IMDB (keyword: imdb)
- Twitter (keyword: st)
- del.icio.us (keyword: del)
- Flickr (keyword: flickr)
- Acronym Finder (keyword: acro)
- Wikipedia (keyword: w)
- Urban Dictionary (keyword: slang)
- WordPress plugins (keyword: wp)
