At the LUG meeting on Tuesday, I saw that Brian R. was using the Google bar in Firefox. It's 2005 and people are still using the Google bar! The guy giving the presentation had the default Google widget still on his address bar. Why is that damn thing still there?
Because people don't know about quick searches and keywords. I've mentioned them before, but only in the context of importing to them from OmniWeb. Here's an explanation for Brian and everyone else who's wasting time with trivial search plugins to Firefox.
Go visit Google and search for something. I'm going to search for "rjbs" because I'm egotistical. Google generates this URI for the search:
http://www.google.com/search?ie=utf8&oe=utf8&q=rjbs
It says "search for the query 'rjbs' with the input and output encoded in UTF-8." (I have notes on all of the parameters, but more on that another day.)
I'll be really egotistical, now, and bookmark that search. I'll hit Ctrl-D (I could just go to the Bookmark menu and take "Bookmark this page" but I don't like clicking) and then click OK to save the bookmark.
Now, when I'm curious about what's going on with my name, I can go click that bookmark. Of course, that's sort of silly, so I can take that bookmark and make it more useful. In the Bookmarks Manager (in the Bookmark menu) I can find that bookmark and bring up its properties. Here, I see more fields than there were before, including one called "keyword." If I give a bookmark a keyword, I can use that word to open it.
So, if I wanted to make this bookmark sillier, I could give it the keyword "rjbs" and then just type "rjbs" into the address bar. It would open this bookmark.
I'm going for /less silly/, though, so I'm going to make this sort of an abstract bookmark. In the Location field, I'll replace "rjbs" with "%s" so the Location looks like this:
http://www.google.com/search?ie=utf8&oe=utf8&q=%s
I'll give the bookmark the keyword "g". If I type "g" into the address bar, now, it searches for "%s" -- a pretty useless search. The magic is that I can type more /after/ the "g" in the address. So, to search for myself, I go to the address bar and type "g rjbs". Firefox replaces the magic "%s" in the Location field of the bookmark with everything after the space after "g" and that turns it into a search for rjbs.
I can type "g hot pants" or "g mini site:apple.com" and get those searches.
So far, this saves you no keystrokes. Now you're hitting Ctrl-L, g, space to Google instead of Ctrl-L, tab to get to the Google box. The great thing is that this is obviously not a Google-only approach. I don't need some goofy drop-down with my search engines, either. I just need more bookmarks. Here are some that I like:
keyword: imdbt address: http://www.imdb.com/find?tt=on;q=%s purpose: "imdbt Stripes" finds IMDB data on the Murray/Ramis classic
keyword: dist address: http://search.cpan.org/dist/%s purpose: "dist Rubric" finds the information on my Rubric package
keyword: nf Hackers address: http://www.netflix.com/Search?search_submit.x=0&search_submit.y=0&v1=%s purpose: lets me find and enqueue a movie with Angelina Jolie's boobs
Re:Other stuff
rjbs on 2005-01-13T16:08:45
Up one level and search-this-site should be simple-ish with JavaScript. Make the bookmark a redirect to Google that, to build the redirect, takes the current location, yanks the site, and puts it after site:
Not nothing, but not complex. I'm on a 12" PowerBook, so I don't like giving up space for the googlebar and its minions.
You aren't being lazy enough, with that manual URL hacking!
Simply go to Google (or wherever), right-click on the textbox (or press Shift+F10
) and choose 'Add a Keyword for This Search
Note that it even takes into account the current state of other controls that are part of the form, such as the radio buttons on per-country Google pages.
Re:Lazier
rjbs on 2005-01-13T17:36:19
That, sir, is rocking. I will amend my canonical copy of that document asap.