Weekend project - my first Sublime Text 2 plugin. If you have package control installed, no need to go to the Github page, just search "Hacker News" and you should be able to find it.
It's not the best documented API I've worked with but it's also nowhere near the worst. There's also a very active IRC channel on Freenode (#sublimetext) which I found helpful. The API docs are here: http://www.sublimetext.com/docs/2/api_reference.html
I borrowed quite a bit by reading the source of other plugins too (especially PlainTasks, a very good To Do list tool for Sublime). I think this is pretty much essential to creating a plugin as there are parts that just aren't documented very well, or at least I couldn't find it.
Finally, Sublime borrows quite a bit from Textmate. The theme syntax, for example, is taken from Textmate - so you can always read the documentation for Textmate's API, which is somewhat better documented.