Home Download Buy Blog Forum Support

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

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

Postby pier on Wed Nov 07, 2012 6:12 am

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

https://github.com/alienhard/SublimeAll ... letions.py

I've checked the API documentation but haven't found anything useful...

http://www.sublimetext.com/docs/2/api_reference.html
pier
 
Posts: 92
Joined: Fri Jun 15, 2012 2:47 am

Re: how to list symbols from a file with the Python API?

Postby quarnster on Wed Nov 07, 2012 7:56 am

You could do something like:
Code: Select all
[view.substr(a) for a in view.find_by_selector("meta.function")]
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], nonolly and 7 guests