Skip to content

Instantly share code, notes, and snippets.

@wmayner
Last active December 5, 2018 19:31
Show Gist options
  • Save wmayner/fab55b263dfd535d001feb8921449455 to your computer and use it in GitHub Desktop.
Save wmayner/fab55b263dfd535d001feb8921449455 to your computer and use it in GitHub Desktop.
Short guide to using my Slate keybindings

Slate bindings

Window focus

  • Pressing Ctrl + Esc (or Ctrl + Caps Lock if you have Caps Lock mapped to Esc) will put a “window hint” at the center of every currently visible window.
  • These will each have a unique letter in them.
  • Pressing a letter will focus that window.
  • Pressing Esc will cancel the window hints.

Window movement/resizing

Think of the o, k, l, and ; keys as arrow keys:

  • k =
  • ; =
  • o =
  • l =

Halves

Cmd + Ctrl + [direction key].

  • Left half:
    • Cmd + Ctrl + k
  • Right half:
    • Cmd + Ctrl + ;
  • Whole screen (maximize window):
    • Cmd + Ctrl + o
  • Bottom half:
    • Cmd + Ctrl + l

Quadrants

Cmd + Option + [lower/upper] + [left/right].

Ctrl means “lower”, Shift means “upper”, k means “left”, and ; means “right”.

  • Lower left:
    • Cmd + Option + Ctrl + k
  • Lower right:
    • Cmd + Option + Ctrl + ;
  • Upper left:
    • Cmd + Option + Shift + o
  • Upper right:
    • Cmd + Option + Shift + ;

Other bindings

Here's the portion of the ~/.slate file that specifies these bindings (lines beginning with # are comments), in case you want to understand the rest of the file:

# okl; bindings {{{

  # Current screen (CTRL + CMD [+ SHIFT]) {{{

    # Full screen {{{
        bind o:ctrl,cmd      ${c-max}
        bind w:ctrl,cmd      ${c-max}
      # }}}

    # Half screen {{{
        bind k:ctrl,cmd        push left  bar-resize:screenSizeX/2
        bind ;:ctrl,cmd        push right bar-resize:screenSizeX/2
        bind o:shift,ctrl,cmd  push up    bar-resize:screenSizeY/2
        bind l:ctrl,cmd        push down  bar-resize:screenSizeY/2
      # }}}

    # Quarter screen {{{
        bind k:ctrl,alt,cmd  ${c-bl}
        bind ;:ctrl,alt,cmd  ${c-br}
        bind k:shift,alt,cmd ${c-tl}
        bind ;:shift,alt,cmd ${c-tr}
      # }}}

  # }}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment