Home Download Buy Blog Forum Support

Reading settings files from a keymap context

Reading settings files from a keymap context

Postby spadgos on Mon Oct 31, 2011 12:54 pm

I'm working on a plugin where I've put the settings into their own file, and now I need to be able to access those settings from a keymap. To illustrate, here's the essential parts of the plugin folder:

Code: Select all
/Packages/MyPlugin
    /Default.sublime-keymap
    /MyPlugin.sublime-settings


The settings file looks like this:
Code: Select all
{
    "hotkey_enabled" : true
}


In the keymap file, I have something like this:

Code: Select all
{ "keys": ["..."], "command": "...", "context" :
        [
            { "key": "setting.???", "operator": "equal", "operand": true, "match_all": "true" }
        ]
}


It's the "???" in the keymap file, which has me stumped. Trying "setting.MyPlugin.hotkey_enabled" or "setting.hotkey_enabled" doesn't work... what's the right way?
spadgos
 
Posts: 121
Joined: Thu Oct 06, 2011 12:49 am

Re: Reading settings files from a keymap context

Postby spadgos on Tue Nov 01, 2011 10:14 pm

bump
spadgos
 
Posts: 121
Joined: Thu Oct 06, 2011 12:49 am

Re: Reading settings files from a keymap context

Postby spadgos on Wed Nov 02, 2011 4:20 pm

Thanks for the help! For my purposes, I think I'll have to leave it in Base File
spadgos
 
Posts: 121
Joined: Thu Oct 06, 2011 12:49 am


Return to Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests