I was about to complain about the current state of affairs and then I saw that it has been discussed here before.
I am not sure I follow option 1. How can I define a context which says “if none of these other contexts is true” other than … oh I see … oooooohhh! You mean go copy all the context statements from all the existing bindings that I can find, except invert the logic of them? Like this?
{"keys": ["escape"], "command": "sbp_quit",
"context": [
{ "key": "sbp_has_visible_selection"},
// inverse of all the "escape" key things found in Default plugin
{ "key": "num_selections", "operator": "equal", "operand": 1 },
{ "key": "has_next_field", "operator": "equal", "operand": false },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "panel_visible", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false }
]
},
So basically, when things stop working, we need to periodically update our own entries.
And if we’re writing a plugin, we should put things kind of thing in the plugin as well, if we want to play nice with the existing infrastructure.