Sublime Forum

Is possible to package override a Sublime Text Default keybinding?

#1

If a package try to define a keybinding which Sublime is defined by default by Sublime Text on Default.sublime-packages, by my custom Sublime Text package cannot override it. How it be changed?

  1. I can think of to define the keybind on the User settings file
  2. Override the Default.sublime-package removing that keybing

Related:

  1. Sublime Text 3 overriding crucial keys in my keyboard layout
0 Likes

#2

It should be possible for a package to override a key binding provided by the Default package or by one of the shipped packages, yes.

Note that resource files with the same name (e.g. Default (Windows).sublime-keymap or Default.sublime-keymap) combine together in package load order, so in order for your binding to “win” and be the active one it has to be the last package loaded that provides the mapping.

1 Like

#3

If it’s the Default that belongs to Default.sublime-packages, and you don’t touch it, than it shouldn’t override anything, but if you made a copy (for example with PackageResourceViewer) and saved it in Packages/Default, then it will override keybindings of other packages with a lower alphabetic letter. If you then copied everything and pasted it in your User keybindings (in Packages/User/), it will override pretty much everything.

1 Like