Chromium Tricks for the Lazy Programmer

One of the cool time-saving features in Chromium (better known as Google Chrome) is the custom search engines. It’s not a new concept. Mozilla Firefox has similar capabilities, but it feels like a hassle sometimes. You have to physically select the custom search engine in a separate combo box, then enter your search terms. That takes up extra time with all that mouse action, especially for a lazy programmer like me. Chromium goes on step further. The address box has a secondary function as a search box. If you were to enter anything but a URL or a domain name in the box, Chromium treats it as a search term and uses the default search engine. Google is default on mine, but any search engine that uses HTTP GET query parameters can be used.

If I was not a programmer, I may use my default search engine to do general searching. But, when I want to search programming language documentation, I would normally have to add the programming language name as a search term.  Given that a lot of programming languages have fairly common words as their names (python, ruby, lisp), you may waste some brain cycles filtering.  Again, for a lazy programmer, I want my information correct as well as fast.

So Chromium allows me to create a custom search engine to query a specific web site. In my example, I will be using lispdoc to search Common Lisp documentation. First, you need to go to the site and examine how a query is done. For lispdoc, the query is very similar to Google. However, there is another time-saving feature in Chromium. If you performed a search on the target site, there is a good chance that Chromium has already added a custom search engine for you:

Manage Search Engines

Wicked awesome! For lispdoc, the Chromium recognized that I searched on that site and added an entry for me. I don’t think there was anything special the site did, but you can add a search engine on your own if Chromium did not detect it for some reason.  The only issue that I have with it is the keyword property that Chromium selected. It put the domain name as the keyword, but why is that important?

The keyword is how you tell Chromium that you want to use a custom search engine instead of the default. It’s almost like what you would do if you went to the search engine directly with one important difference. If I entered the keyword (currently “lispdoc.com”) in the address box, space bar, then tab key, Chromium selects the custom search engine matching that keyword:

Using custom search

Then, I can enter more search terms. Unlike Firefox, I do not need to stop typing to tell Chromium what I want. The mouse is not even involved. Perfect for the lazy programmer? Not just yet. Since the keyword defaulted to the domain name (“lispdoc.com”), it has two usability problems.  Since I visited lispdoc.com, the URL shows up in my browsing history and will probably be the first selection. So, a chance a mistake can occur.  The second problem is that the name is too long for a lazy programmer.

The solution to both problems is quite simple: change the keyword to something else.  For lispdoc.com entry, I would change the keyword to “cl” for “Common Lisp”, which makes it less characters, no ambiguity, and easy to remember. Now, I can search documentation very quickly now. I have specific searches for other popular sites and assign them to shorter keywords, also. Here are some examples:

Try it out and let me know what you think!



%d bloggers like this: