atom / atom-keymap

Atom's selector-based keymap system
MIT License
105 stars 58 forks source link

CMD+right/left for focusing panes works unexpected #117

Closed crunchtime-ali closed 8 years ago

crunchtime-ali commented 8 years ago

I want to move between left and right pane by hitting CMD+left or respectively CMD+right. Therefore I added this to my keymap:

'atom-text-editor':
  'cmd-left': 'unset!'
    'cmd-right': 'unset!'

'body':
  'cmd-right': 'window:focus-pane-on-right'
  'cmd-left': 'window:focus-pane-on-left'

When the right Pane is focused and I'm switching to the left pane, it works flawlessly. The other way around it uses the default behaviour of setting the cursor to the line end of the current editor. So basically switching to panes on the left works but on the right it doesn't. I doubt that this is expected behaviour.

I'm running Atom 1.6 on OS X 10.11.4

lee-dohm commented 8 years ago

CSON is an indentation-sensitive language. So this:

'foo':
  'bar':
    5

is something different from this:

'foo':
'bar':
  5

If you change the first block in your example to:

'atom-text-editor':
  'cmd-left': 'unset!'
  'cmd-right': 'unset!'

things should work fine.

crunchtime-ali commented 8 years ago

Thanks, this fixed the problem.

At my host it was set like this:

'atom-text-editor':
<space><space>'cmd-left': 'unset!'
<tab>'cmd-right': 'unset!'

It looked exactly the same (without invisibles).