Skip to content

Instantly share code, notes, and snippets.

@denisshevchenko
Last active July 31, 2018 13:44
Show Gist options
  • Save denisshevchenko/10094a8b45f80b046c74bca66d9cb59b to your computer and use it in GitHub Desktop.
Save denisshevchenko/10094a8b45f80b046c74bca66d9cb59b to your computer and use it in GitHub Desktop.

tmux for Vimer

Simplest cheatsheet ever.

Configuration

I use this .tmux.conf.

Commands

prefix = Ctrl+a. Advice: turn CapsLock key to Ctrl key via your system settings.

Sessions

Command Action
prefix s List of sessions. You can select from the list.
prefix : new -s sname Create new session with name sname.
prefix ) Go to the next session.
prefix $ Rename current session.
prefix : kill-session -t sname kill session with name sname.

Windows

Command Action
prefix w List of windows in the current session. You can select from the list.
prefix n Go to the next window.
prefix c Create new window.
prefix , Rename current window.
prefix : killw Kill current window.

Panes

Command Action
`prefix `
prefix - Split current pane vertically.
prefix h/j/k/l Move between panes. Yes, it's Vim way. ;-)
exit Kill current pane.

Work with text

Command Action
prefix Esc Go in the Copy mode.
h/j/k/l/gg/G Moving in the Copy mode.
q Exit from the Copy mode.
v Go in the View mode from the Copy mode.
h/j/k/l Selecting text in the View mode.
y Copy selected text in the View mode and exit from it.
prefix p Past text.

Due xclip I work with the system clipboard as well. Thus, I can copy text in tmux and paste it to anywhere or vice-versa.

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