Why do user key-bindings not take priority


Why do user key-bindings not take priority off system key bindings.

i.e I added a key binding for indenting code

Shouldn’t MY key bindings be more important?

I get no formatting and stupid fold-selection (fold-selection when there is no selection… might I add, another bug…)


I wonder what it means that they both have checkmarks.


Because they use rule structure’s similar to CSS.


Tbh I don’t 100% understand the link above. I usually play it by ear through testing. But essentially, the more specific rule wins.

.editor can have any parent, but .workspace .editor will only apply to .editors which are inside a .workspace, which is more specific. Basically, the higher up in the DOM you specify from, the higher the order of precedence.


You can also learn about keymaps and specificity in the official documentation:



This is just way too complicated. I just want to override a binding, not learn about unsetting existing bindings…


Your specified key binding rule is less specific than the built-in one; just make yours as specific as the built-in key binding

'.workspace .editor:not(.mini)':
  'ctrl-alt-f': 'editor:auto-indent'


What about this one?

As you can see, my keybinding is more specific, and still is being overriden by the editor…


What if you just do ink-console atom-text-editor?


Same error

I’m using atom 1.9.8


If you have steps to reproduce the problem, please open an Issue on https://github.com/atom/atom-keymap and @-mention me on it. I’ll have the team take a look.


There was already an issue open, so I’ve added to it: https://github.com/atom/atom-keymap/issues/138.

Let me know if it’s better to open a new one.