Sublime Forum

How to list symbols from a file with the Python API?

#1

I’m trying to modify the all autocomplete package, so that instead of auto completing all words in all files, it just listed methods.

github.com/alienhard/SublimeAll … letions.py

I’ve checked the API documentation but haven’t found anything useful…

sublimetext.com/docs/2/api_reference.html

0 Likes

#2

You could do something like:

[view.substr(a) for a in view.find_by_selector("meta.function")]
0 Likes