Hey there, I’m wanting to have a key bind to toggle open_files_in_new_window
between never
and always
Here’s what I’ve got in my keybind settings
{
"keys": ["f8"],
"command": "set_user_setting",
"args": {
"file": "Preferences.sublime-settings",
"setting": "open_files_in_new_window",
"value": "never"
},
"context" :
[
{
"key": "setting.open_files_in_new_window",
"operator": "regex_match",
"operand": "always"
},
]
},
{
"keys": ["f8"],
"command": "set_user_setting",
"args": {
"file": "Preferences.sublime-settings",
"setting": "open_files_in_new_window",
"value": "always"
},
"context" :
[
{
"key": "setting.open_files_in_new_window",
"operator": "regex_match",
"operand": "never"
},
]
}
If I remove the context and keep one, it works to change the setting, but I want one button to toggle it. What’s not working here?