sublime-devdocs
sublime-devdocs copied to clipboard
Prefixing DevDocs search with current langage when possible
Hey,
It would be great if a search was prefixed with the current file's language.
For example, if I search for empty
in my PHP file, the requested devdocs page could be http://devdocs.io/#q=php empty
. That would improve the chances that the doc page we get on devdocs is the one really tied to our search.
This is somewhat hard to do for the libraries docs (jquery, ruby on rails, ...): we can be in a .js file, with the "js" language, but using jQuery functions. So if we prepend the search with "js", all the jQuery functions won't be visible...
Currently using this gist, I narrow the search to a specific langage only for those I know they don't have libraries. Not that great but hey, better than nothing... Check it out!
Just spent 2 minutes staring at the golang docs for the io
package before i realized that I was in the wrong language. I was in fact looking for the docs of the python io
module.