How Cool are Custom Keywords?by Asa Dotzler, edited by Daniel Wang
Mozilla Custom Keywords ROCK! Not just for making shorthand for bookmarks but also for searches and queries. Simple keywords allow you to type a short string in the Location Bar and load its corresponding Bookmark URL.
An example is my bookmark for
http://www.mozilla.org to which I've added the
. So, with that set, I can type
in the Location Bar and it loads
http://www.mozilla.org. Using keywords combined with autocomplete in Mozilla and I seldom
type more than about three or four characters for all of the sites I regularly visit.
To set a keyword you must first create a bookmark for the URL. Then you add the keyword to the bookmark. Open the Bookmark Manager (Ctrl+B), choose your bookmark, and then open the Bookmark Properties window (Ctrl+I, or from the context menu). In the window simply add a short string to the Keyword field. Now close that dialog and you can type the keyword in the Location Bar, hit enter, and Mozilla will load that URL.
But that's just the beginning. Custom keywords can be used to create shortcuts for your favorite search engines too (the 'this ROCKS!' part). Here's how it works.
I'll use Bugzilla Bug Report lookup as an example.
https://bugzilla.mozilla.org/show_bug.cgi?id=%s, where the
%swill be replaced by the bug number (query string)
- Give the bookmark the keyword
- Now typing
in the addressbar will load that bug.
The keyword "bug" followed by a space and the bug number will load the URL
"https://bugzilla.mozilla.org/show_bug.cgi?id=" + the bug number "12345".
Some other really cool examples:
http://www.google.com/search?q=%s(I gave it the keyword "?")
http://www.google.com/search?q=%s&btnI=I'm+Feeling+Lucky(I gave it the keyword "g")
http://search.dmoz.org/cgi-bin/search?search=%s(I gave it the keyword "dmoz")
http://www.dictionary.com/cgi-bin/dict.pl?term=%s(I gave it the keyword "dict")
http://lxr.mozilla.org/seamonkey/find?string=%s(I gave it the keyword "lxrfile")
http://lxr.mozilla.org/seamonkey/search?string=%s(I gave it the keyword "lxrtext")