Is there a way to cleanly unbind a command from a package?
I ran into this problem with Emacs Pro Essentials and SublimeLinter. In the Emacs package ctrl-k
is setup to a command that kills from the point to the end of the line, per Emacs behavior. However ctrl-k
was also chosen to be used by SublimeLinter authors to precede certain commands like ctrl-k p
in a keystroke pattern keybinding (as opposed to a pure chording keybind.)
I did some poking around and it seems like a popular choice for unbinding a key is to redefine it as a “noop” command. However this is not a particularly clean unbinding. All it does is prevent the keybind from executing. It does not instruct the keybind system in ST to not pay attention to the keybind. In this particular case because the keybinds were keystroke patterns, ST will wait to find out if there’s a following keystroke after the initiator. As a result, ctrl-k
in Emacs mode was still operating really strangely.
The only solution I had was to comment out all the keybinds in SublimeLinter and restart. Fortunately that package is one that installed not as a .sublime-package
but rather in a directory. (Honestly I didn’t even know there was an option to not use the package file format through Package Control, but that’s a different topic.)
Is there a better way to eliminate keybinds?