Next to the drop-down list with the defaults, there is the button “Manage search engines...”, which is where things get interesting. First there is a list with “default search engines” (the ones in the drop-down list), then there is a list with “other search engines”. You can add new search engines to the latter and then move them to the former by clicking the “Make default” button that appears when you hover over an appropriate item.
A search engine entry has three fields: A name, a keyword and a URL. The keyword is an abbreviation for the URL, the URL can contain the placeholder string “%s” where Chrome fills in what you have typed in order to perform a query. Lets try this out and add the following search engine to “other search engines”:
Then Chrome tells us to hit Tab, after which we can enter a query:
Chrome also recognizes when you are typing the beginning of a keyword, so you can choose a longer one, if you want to (caveat: not always reliable when several keywords start with the same characters). Google’s documentation says that normal URLs work, too, but that wasn’t the case for my Chrome.
Note that Firefox has had this feature for a long time [1]. You can turn any bookmark into a search engine by assigning it a keyword. This has the added advantage that you can organize your keyword bookmarks in folders.
<link rel="search" type="application/opensearchdescription+xml" href="data/opensearch.xml">The file data/opensearch.xml contains the actual OpenSearch meta-data, for example:
<?xml version="1.0" encoding="UTF-8"?> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> <ShortName>Exemplary</ShortName> <Description>Use Example.com to search the Web.</Description> <Url type="application/rss+xml" template="http://example.com/?q={searchTerms}"/> <Url type="application/x-suggestions+json" template="http://example.com/suggestions?q={searchTerms}"/> </OpenSearchDescription>The first Url tag tells Chrome how to search, the second one tells it how to retrieve suggestions. As far as I can tell, Chrome automatically assigns the domain name of the URL as a keyword.
You can go to vimeo.com to see a real-world example. After you have visited that web site, there is an entry for it in your “other search engines”.
eval [tab] 3 * 7 → 21 eval [tab] 'abc'.length → 3