Home Download Buy Blog Forum Support

Jquery & Dojo Quick api doc access plugin

Jquery & Dojo Quick api doc access plugin

Postby skkeeper on Fri Apr 20, 2012 5:22 pm

Hi everyone,

I started using ST2 a couple of weeks ago and I'm already in love with it. Since I don't have the money at the moment (I'm ashamed to admit it) but I still haven't bought a license, but I will as soon as I can. In the meantime I'm kinda interested in developing a plugin that will allow you to access Javascript API Documentation quickly. I'll probably start with Jquery and Dojo, since those seem easily enough to hack the urls.

As an example, let's say you have the following code:
Code: Select all
$('body').html();
            ^

And you have the cursor anywhere inside the "html" part, with this plugin you could trigger a command and a new tab would pop open in the jquery doc of the html method (http://api.jquery.com/html/).

My question is: is there already a existent plugin with similar functionality? I did a quick search on the Package Manager and on the forums and I can't find one. Also would this be useful for anyone out there?

Thanks :)
skkeeper
 
Posts: 4
Joined: Fri Apr 20, 2012 5:12 pm

Re: Jquery & Dojo Quick api doc access plugin

Postby skkeeper on Fri Apr 20, 2012 7:04 pm

Since trying is better than actually explaining, I did a draft script of the plugin:

https://github.com/skkeeper/OpenJsApi/zipball/develop

The commands provided are 'open_js_api' (for the official documentation) and 'open_js_api_info' (for the jsapi.info website), or you can just use CTRL + SHIFT + P and select "View Official JS API Documentation" or "View JSAPI.info API Documentation" while you have the cursor in one of the methods.

As I said this is just a initial hack to demonstrate the concept. Some feedback would be great :)
skkeeper
 
Posts: 4
Joined: Fri Apr 20, 2012 5:12 pm

Re: Jquery & Dojo Quick api doc access plugin

Postby skkeeper on Sat Apr 21, 2012 2:55 pm

Ok so I found Go To Documentation plugin pretty much replicates this functionality but doesn't have specific support for Javascript libraries, I'm forking the project and adding the functionality. Hopefully the original author will accept the merge.

EDIT: In the meantine my fork is available here for testing: https://github.com/skkeeper/sublime-tex ... umentation
skkeeper
 
Posts: 4
Joined: Fri Apr 20, 2012 5:12 pm


Return to Plugin Development

Who is online

Users browsing this forum: Exabot [Bot] and 7 guests