Keymapping Auto-Indent?


#1

I have this in my keycap.cson file:

'.editor':
  'ctrl-i': 'window:toggle-invisibles'
  'ctrl-t': 'editor:toggle-indent-guide'
  'ctrl-v': 'tree-view:toggle'
  'ctrl-l': 'go-to-line:toggle'
  'cmd-shift-[': 'editor:auto-indent'

But the mapping for auto-indent doesn’t trigger. The others work fine. Where have I gone wrong?


#2

Have you try to use the key binding resolver to study which keys combination is triggered or which command takes precedence?


#3

I didn’t know about that! Clever.

When I use it I see it register the cmd and then the shift keys, but when I add the [ key, the key binding resolver shows me cmd-[, not cmd-shift-[ and that it wants to execute the pane:show-previous-item command in the .body scope.

Does that sound right?


#4

Settings->Keybindings shows my attempt as shift-cmd-[ and the “wrong” command as cmd-[, as if something is swallowing the shift.


#5

It could be that cmd-shift-[ is cmd-shift-{, given that shift-[ gives you {… Just a wild guess.


#6

Yes, I did get it to work with cmd-{ which seems counterintuitive, but…