Anyone know if there’s a way to browse Mocha tests (in CoffeeScript)via Sublime Text 2 symbols list? Ideally there’d be a plugin, but I’d be fine with editing my CoffeeScript plugin to look for describe and it. I don’t know how the whole tmLanguage thing works, could someone show me how to do it or let me know the code to add.
It’d be super rad to navigate my testes using ST2 symbols list!
Thanks!
Although CoffeeScript has a good coloring support in ST2, it’s pretty bad in Go To Symbol panel.
I’ve created a fork of original plugin, where (along with some other cosmetic changes) it shows all classes and functions defined in a file, as well as some known method invocation such as ‘describe’, ‘it’ for Mocha and ‘app.get’, ‘app.post’, etc for Express.
Currenly it looks like this:
You can see the changes diff on GitHub.
To install it, either download the package and unzip its contents to your Packages/CoffeeScript directory, or git clone it (dont forget to close ST2 beforehand):
I’ve also added it as a pull request to the original plugin author, so lets hope it will be in standard package soon.