tildebyte / ChucK-plugin-for-ST3

A Sublime Text 3 plugin for ChucK (http://chuck.cs.princeton.edu).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Direct jump to method docs for 'Std', 'Math', and 'Machine'.

tildebyte opened this issue · comments

chuck_doc_search.py:
It's possible to jump directly to method documentations for e.g. 'Std.' or 'Math.' by using anchor ('#') URLs:
http://chuck.cs.princeton.edu/doc/program/stdlib.html#atoi
The links don't exist on the rendered page, but the anchors are in the HTML source.

Highlighting 'Std.atoi' and hitting 'CTRL+SHIFT+]' should go directly to the doc for 'atoi'. Shouldn't be too hard to split the highlighted string and massage the search URL. I wouldn't worry about storing all of the method names; just whack anything after the '.' onto the end of the URL. If it's invalid, hopefully the end-user will figure it out :)

Also, it'd be cool to alias 'Math' and 'Machine' to 'Std' so lookups on those would work as well (though they'd go to the same URL).

yep, lemme see what can be cooked up quickly.
so..

Std.x sends to stdlib.html#x
Machine.x sends to stdlib.html#x
Math.x sends to stdlib.html#x

OK, i've been meaning to do this anyway.