Closed wistful closed 8 years ago
Looks like it's not possible to override key bindings in the same way as for plugin settings. (http://sublime-text-unofficial-documentation.readthedocs.org/en/latest/reference/key_bindings.html) There is a workaround though. Default plugin's key bindings:
[
{ "keys": ["ctrl+8"], "command": "auto_pep8", "args": {"preview": true} },
{ "keys": ["ctrl+shift+8"], "command": "auto_pep8", "args": {"preview": false} }
]
To use different binding user should open Preferences -> Key Bindings - User
and put the same lines but with different keys, e.g.
[
// override default key binding with fake command
{ "keys": ["ctrl+8"], "command": "fake_command", "args": {} },
{ "keys": ["ctrl+shift+8"], "command": "fake_command", "args": {} },
// set new key binding
{ "keys": ["ctrl+9"], "command": "auto_pep8", "args": {"preview": true} },
{ "keys": ["ctrl+shift+9"], "command": "auto_pep8", "args": {"preview": false} }
]
Plugin is installed as Installed Packages/AutoPEP8.sublime-package and provides link only to the default plugin's keymap which can't be changed. The plugin should support keymap overriding.