You know that bindings are all collected into one big array from all the keymaps in the order of `Default/PackageA ... PackageZ/User`?
They are then matched in reverse order, `User/PackageZ...PackageA/Default`, taking the first that matches.
- Code: Select all
>>> 'V' > 'S'
True
Vintage comes after SublimeGDB in the load order, so will be matched against first.
- Code: Select all
{ "keys": ["enter"], "command": "set_motion", "args": {
"motion": "move",
"motion_args": {"by": "lines", "forward": true, "extend": true }},
"context": [{"key": "setting.command_mode"}]
},
Your views must have `command_mode` set somehow? You are using Vintage or the plugin sets it? I looked over your code and it doesn't use command_mode so I'm guessing you use Vintage with `"vintage_start_in_command_mode": true`? That setting mostly effects files `on_load`, which I don't think would kick in for scratch views but I guess the following code, would put ALL files into command_mode.
- Code: Select all
class InputStateTracker(sublime_plugin.EventListener):
def __init__(self):
for w in sublime.windows():
for v in w.views():
if v.settings().get("vintage_start_in_command_mode"):
v.settings().set('command_mode', True)
Your plugin keeps the panels between sessions?
- Code: Select all
querying gdb_variables_view
That's quite odd. I can't really make sense of that at the moment. I always thought the binding matching was synchronous. ie, the on_query_context wouldn't be callled until it was required. With your bindings being below the Vintage binding in the stack, ("in my Default.sublime-keymap for my plugin") I dunno why it's callled at all.
Anyway, I'd try putting your bindings inside the User/Default.sublime-keymap file. That should take priority over Vintage then. If the bindings work then, you might have to consider renaming your package if you don't want people to have to manually move the bindings into their User keymap (and maintain them between updates)
- Code: Select all
>>> new_package_name = 'ZSublimeGDB'
>>> cmp(new_package_name, 'Vintage')
1
It is better to remain silent and be thought a fool, than to speak out and remove all doubt