Sublime Forum

Plugin preferences

#1

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.

0 Likes

#2

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.

0 Likes

#3

Yes, but I actually meant like adding a .sublime-options file in your plugin and then being able to access them.

0 Likes

#4

Ah, I see - no, that’s not supported, although it would be handy to have.

0 Likes

#5

Ah, I thought so. That’s a shame.

0 Likes