Better Pane Splitting in Atom with Vim Influenced Shortcuts

The Problem

The default shortcuts for pane splitting in Atom suck.

If you're on Mac you have to hit cmd-k and then hit an arrow button to send your current pane to the position you want it.

For me on my keyboard this means leaving home row. Booo! I don't want to leave home row.

I use Vim key bindings in Atom so I wanted shortcuts that roughly mapped to their Vim command-mode counterparts for splitting and pane navigation.

The default of cmd-k is not a bad start but let's fix the rest.

TLDR: The solution

Open up your keymap.cson and just add the following.

# Useful keybindings and overrides
'atom-text-editor':  
  'cmd-k j': 'pane:split-down'
  'cmd-k k': 'pane:split-up'
  'cmd-k h': 'pane:split-left'
  'cmd-k l': 'pane:split-right'
  'cmd-k cmd-j': 'window:focus-pane-below'
  'cmd-k cmd-k': 'window:focus-pane-above'
  'cmd-k cmd-h': 'window:focus-pane-on-left'
  'cmd-k cmd-l': 'window:focus-pane-on-right'
What the solution does

Now to move around the panes you just hold down cmd hit k to drop into the partial command mode that readies Atom to accept the next command and finally hit the Vim inspired letter, while still holding cmd, for the direction you want to go.

So if you're in the top pane and you want to go to the pane that's open below you hit cmd k j. Hit cmd k k to go back up.

To split the pane you'll press and release cmd-k and then just hit the directional letter without holding cmd to split in your chosen direction. So cmd-k and then l to split left.