The Fastest Way to Search API and Help Docs
Posted on September 24, 2013 - category: tech-art
You probably frequently visit at least one or two API documentation, help docs or reference websites when you are programming or learning a new language or software. Firefox and Chrome have a trick to use a custom search keyword in the location bar to quickly navigate API docs or any other frequently searched sites. If you take a few minutes to set this up, it will save you a lot of time and keystrokes, I promise.
So for example, when I want to search the Maya PyMEL docs, all I have to type is “pm setTransformation” in the location bar and Chrome brings me directly to the search results in the PyMEL documentation.
I don’t have to Google first. I don’t have to click a bookmark and then find the search box first. I just search and I’m there.
Here’s how to set that up.
First browse to your most frequently used help documentation and do a search for anything. You just want to be able to find the url of the search results so you can replace it with “%s”.
Template URL
- http://yoursite/search.html?q= your_search_term
- http://yoursite/search.html?q=%s
Google Chrome
- Copy the url of your search
- change the search query to “%s” (examples below.)
- In the URL bar, right click and click “Edit Search Engines…”
- Under “Other Search Engines“, scroll to the bottom where you can enter your info.
- Enter a name, a unique keyword to trigger the search and then your %s URL.
Firefox
- Copy the url of your search
- change the search query to “%s” (examples below.)
- Under “Bookmarks” click “Show All Bookmarks” or hit Ctrl-Shift-B.
- Right click in the bookmarks area and click “New Bookmark”
- Enter a name, your %s URL, optional tags, and a keyword to trigger the search.
Some examples for the search term “matrix”:
Unity3D Scripting Reference
- http://docs.unity3d.com/Documentation/ScriptReference/30_search.html?q=matrix
- http://docs.unity3d.com/Documentation/ScriptReference/30_search.html?q=%s
- keyword: assign a unique keyword or acronym. Just don’t pick a word you would use in a regular search: Perhaps “un” for Unity3D.
Maya PyMEL
- http://download.autodesk.com/global/docs/maya2014/en_us/PyMel/search.html?q=matrix&check_keywords=yes&area=default
- http://download.autodesk.com/global/docs/maya2014/en_us/PyMel/search.html?q=%s&check_keywords=yes&area=default
- keyword: I use “pm” for PyMEL
Stack Overflow
- http://stackoverflow.com/search?q=matrix
- http://stackoverflow.com/search?q=%s
- keyword: “sto” for Stack Overflow (the keyword isn’t triggered until you hit spacebar, so you would still be able to type “storage” for example, and you still have the option to search Google for “sto foobar” if you click down twice.)
Google Groups
- https://groups.google.com/forum/#!search/matrix
- https://groups.google.com/forum/#!search/%s
- keyword: “gg” for Google Groups. Whatever is easy for you to remember.
In Summary…
Now you type your keyword followed by whatever you want to search for and it will directly bring you to the search results on that page. (And once you are on the page, don’t forget the Ctrl-F hotkey!) This will make you look like a fast-browsing maniac to anyone watching over your shoulder.
Comments (closed)
Sune: Nice one! Alas this does not seem to work for any of the autodesk native online documentation
Chris Lesage: Sune, that is true because they use frames. But you can try this tip from Benedict Apuna and use a mix of Custom Search + Google Site Search: Add “site:” to the front and put a space between %s. Don’t forget to remove the final “whatever.html” from your template url. Maya API: “site:docs.autodesk.com/MAYAUL/2013/ENU/Maya-API-Documentation %s”
Tyler Hurd: Awesome. Wish I had known about this years ago.
Mayur: very nice trick thanks a lot !!