Sublime Forum

Cannot Overwrite Key Bindings Using "User" File

#1

I have two packages (Alignment and SublimeLinter) that are using the same command (super+ctrl+a). I want to override SublimeLinter’s key bindings so that Alignment works properly. If I go to Preferences > Key Bindings - User or Preferences > Package Settings > SublimeLinter > Key Bindings - User, they open up the same file: ~/Library/Application Support/Sublime Text 3/Packages/User/Default (OSX).sublime-keymap. It seems strange to me that these wouldn’t be separate files, but no matter. The point is that any edits to this file are not working. I have to edit SublimeLinter’s keymap file to see the changes. This isn’t ideal because whenever SublimeLinter gets updated, I’m going to lose the custom keymap.

Here’s the contents of SublimeLinter’s keymap file:


    { "keys": "ctrl+super+l"], "command": "sublimelinter_lint" },
    { "keys": "ctrl+super+e"], "command": "sublimelinter_goto_error", "args": {"direction": "next"} },
    { "keys": "ctrl+super+shift+e"], "command": "sublimelinter_goto_error", "args": {"direction": "previous"} },
    { "keys": "ctrl+super+a"], "command": "sublimelinter_show_all_errors" }
]

And here’s what I’ve placed in the custom “User” keymap file:


    { "keys": "ctrl+super+shift+a"], "command": "sublimelinter_show_all_errors" }
]

This should bind the sublimelinter_show_all_errors command to ctrl+super+shift+a. It does do that, but ctrl+super+a remains bound to the same command, when I want Alignment to use this key command.

What am I doing wrong here?

NOTE: If I change the command in the “User” keymap file to alignment, that seems to work fine. Strange that it works for one package and not another…

0 Likes