Search code examples
sublimetext3key-bindingskeymapping

Sublime Text 3 keybinding priority


When I've installed a new sublime package the new package occasionally overwrites a keybinding I've added.

In my User sublime-keymap settings is there any way to give priority to my custom key-binding? For example any custom key-mapping I add has priority over default package ones?


Solution

  • According to the Sublime Unofficial Docs, packages (including any key bindings) are loaded in the following order:

    1. Packages/Default;
    2. shipped packages in lexicographical order;
    3. installed packages in lexicographical order;
    4. all remaining user packages, except for Packages/User, that did not override anything, in lexicographical order;
    5. Packages/User

    Basically, any settings you have in Packages/User are the final word in what happens. So, if an installed plugin tries to use a keybinding for which you already have a definition in Packages/User, it won't work – your settings will override it.