Skip to content

Latest commit

 

History

History
99 lines (76 loc) · 5.63 KB

tmux.md

File metadata and controls

99 lines (76 loc) · 5.63 KB
  1. General
  2. Panes
  3. Windows
  4. Sessions
  5. Command Line
  • <Prefix> :list-keys or ? shows a list with key bindings
  • :list-commands lists available commands
  • Commands can be run either in command-mode or in shell through tmux command options

General

Command Description
:rename-session rename the session
:capture-pane Capture contents of the current pane in a buffer
:clear-history -t 1 Clear history of pane 1
$tmux-attach -t work Attach session work
Key Description
q Escape from various windows
<Prefix> : Enter command mode
<Prefix> [ Enter copy mode
<Prefix> ? List key bindings
(copy-mode) Esc Exit copy mode
(copy-mode) / Search down
(copy-mode) Shift-/ Search up
(copy-mode) Space Begin selection
(copy-mode) y Yank selection
(copy-mode) <Prefix> ] Paste buffer
<Prefix> = Show buffer stack

Panes

Key Description
<Prefix> % Split verticaly
<Prefix> " Split horizontaly
<Prefix> x Kill pane
<Prefix> o Cycle through panes
<Prefix> up, down, left, right Move through panes
<Prefix>-(up, down, left, right) Resize pane
<Prefix>-(H, J, L, K) Resize pane. Custom to my setup
<Prefix> q Identify panes
<Prefix> q 1..9 Go to pane with number
<Prefix> z Zoom in/out pane
<Prefix> { Cycle left position of the pane in the layout
<Prefix> } Cycle right position of the pane in the layout
<Prefix> Space Cycle trough pane layouts
<Prefix> ! Break the pane (make it it's own window)
<Prefix> :join-pane -t :<win_num:> move pane to another window

Windows

Key Description
<Prefix> c New window
<Prefix> , Rename window
<Prefix> & Kill window
<Prefix> l Go to last window
<Prefix> 1..9 Go to window number
<Prefix> p Go to previous window
<Prefix> n Go to next window
<Prefix> w Choose from a windows tree
<Prefix> f Find window by name

Sessions

Key Description
<Prefix> d Detach
<Prefix> s Switch to another session
<Prefix> ( Switch to previous session
<Prefix> ) Switch to next session
<Prefix> Ctrl + s Save session
<Prefix> Ctrl + r Restore session
:new-session -s "Another" Create and name a new session
:kill-session -t "Another" Kill session

Command Line

Command Description
$ tmux list-commands List available commands
$ tmux new-session -s <name> Create a new sessions with name <name>
$ tmux list-sessions List running sessions
$ tmux attach -t <name> Attach to the session <name>. If only one session is running the -t option can be omited.