Home Download Buy Blog Forum Support

Plugin preferences

Plugin preferences

Postby Xikeon on Sat Feb 27, 2010 12:12 am

Hi,

I was trying to get the preference files to work with plugins, but it doesn't seem to find them. Do they work or are they only for file-types? (As I only see wordwrap?) Would be nice to be able to use it in plugins.

I tried using window.options().getString('name') and view.options().getString('name'), but both returning None.

Thanks.
Xikeon
 
Posts: 18
Joined: Fri Feb 26, 2010 5:30 pm

Re: Plugin preferences

Postby jps on Sun Feb 28, 2010 10:02 pm

You can access the options from plugins, yes. There's no option called 'name', so calling view.options().get('name') will return None. Take a look around the Preferences/Default File Type.sublime-options for a list of available options.

You can set options too, in which case you can use any name you wish.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Plugin preferences

Postby Xikeon on Mon Mar 01, 2010 2:10 pm

Yes, but I actually meant like adding a .sublime-options file in your plugin and then being able to access them.
Xikeon
 
Posts: 18
Joined: Fri Feb 26, 2010 5:30 pm

Re: Plugin preferences

Postby jps on Mon Mar 01, 2010 9:18 pm

Ah, I see - no, that's not supported, although it would be handy to have.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Plugin preferences

Postby Xikeon on Mon Mar 01, 2010 10:36 pm

Ah, I thought so. That's a shame.
Xikeon
 
Posts: 18
Joined: Fri Feb 26, 2010 5:30 pm


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 9 guests