Home Download Buy Blog Forum Support

Not documented constants (like sublime.CLASS_WORD_START)

Not documented constants (like sublime.CLASS_WORD_START)

Postby Jerome on Tue Jul 03, 2012 6:39 am

Hi,

In the plugin example Packages/Default/delete_word.py there is some constants:
Code: Select all
sublime.CLASS_WORD_START
sublime.CLASS_PUNCTUATION_START
sublime.CLASS_LINE_END
sublime.CLASS_WORD_END
sublime.CLASS_PUNCTUATION_END
sublime.CLASS_LINE_START
sublime.CLASS_SUB_WORD_END
sublime.CLASS_SUB_WORD_START


The constants are not listed and documented in the API Reference:
http://www.sublimetext.com/docs/2/api_reference.html

After a Google search, I found nothing about them, except this delete_word.py page

They are not documented?
Or they are deprecated and will disappear in a near future?

There is other constants that we can use?

Thanks,
Jerome
:P
Jerome
 
Posts: 4
Joined: Tue Jul 03, 2012 6:26 am

Re: Not documented constants (like sublime.CLASS_WORD_START)

Postby bizoo on Tue Jul 03, 2012 10:25 am

This constants are defined to used by the undocumented view.classify() method.
Do you really need them ? For what purpose ?
bizoo
 
Posts: 873
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Not documented constants (like sublime.CLASS_WORD_START)

Postby Jerome on Tue Jul 03, 2012 6:56 pm

Hi bizoo,

Well, I just start learning sublime plugin dev and I just discover them while browsing the sources.
So now I don't really know if I need them ;)
Did you know why thery are not documented? What they're usefull?

How to obtain the list of all not documented constants / methods like view.classify() ?

Thanks!
J.
:P
Jerome
 
Posts: 4
Joined: Tue Jul 03, 2012 6:26 am

Re: Not documented constants (like sublime.CLASS_WORD_START)

Postby sublimator on Thu Jul 05, 2012 12:15 pm

>>> help(sublime)

While it only shows a bunch of C++ signatures it's still pretty handy
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Not documented constants (like sublime.CLASS_WORD_START)

Postby Jerome on Thu Jul 05, 2012 10:41 pm

cool tips, thanks !
Jerome
 
Posts: 4
Joined: Tue Jul 03, 2012 6:26 am


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 3 guests