Skip to content

Instantly share code, notes, and snippets.

@taylor
Last active January 11, 2020 22:56
Show Gist options
  • Select an option

  • Save taylor/11193071 to your computer and use it in GitHub Desktop.

Select an option

Save taylor/11193071 to your computer and use it in GitHub Desktop.
tmux with VI keybindings

VI keybindings for tmux -taylor

This is for the setup in my .tmux.conf

My tmux prefixes are Ctrl-B and DELETE (not backspace). Either one can be used. I'll refer them both as PREFIX

Some of the key bindings are listed below.


Normal mode bindings

  • PREFIX + | -- split pane vertically
  • PREFIX + - -- split pane horizontally
  • PREFIX + Escape -- Enter copy buffer mode
  • PREFIX + c -- create new window
  • PREFIX + n -- go to next window
  • PREFIX + Ctrl-B -- go to last window
  • PREFIX + d -- dettach from current tmux session (reattach by typing tmux attach)
  • PREFIX + p -- paste copied text grabbed in copy buffer mode

Copy buffer mode

  • PREFIX + Escape -- Enter copy mode
  • Ctrl-U - Go up half a page
  • Ctrl-D - Go down half a page
  • hjkl - move left, down, up, right
  • PGUP/PGDOWN - Up or down half a page
  • v - start highlighting
  • y - copy highlighted text (goes out of copy buffer mode back to normal)
  • Ctrl-C - end copy buffer mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment