Panes put an editor, a test runner and a log tail on one screen, all driven from the keyboard.
A window can be split into panes, each running its own shell.
C-b %splits left/right,C-b "splits top/bottom.C-b+ arrow key moves to the pane in that direction;C-b ocycles through panes;C-b ;goes to the previously active pane.C-b zzooms the current pane to fill the window and back again. AZappears in the status bar while zoomed.C-b xkills the current pane,C-b qbriefly shows pane numbers (press a number to jump).C-b Spacecycles through the preset layouts (even-horizontal, even-vertical, main-horizontal, main-vertical, tiled).C-b {andC-b }swap the current pane with the previous or next one.C-b !breaks the pane out into its own window;join-panedoes the opposite.
Resize with C-b + Ctrl-arrow (one cell at a time, repeatable) or C-b + Alt-arrow (five cells), or drag borders with the mouse once mouse support is on.
The defaults are famously unmemorable, and new panes start in the directory tmux was started in rather than the current one; the configuration lesson rebinds both. Zoom is the most underrated key: work in a split layout, zoom to focus, unzoom to see everything.
Example
# inside tmux:
# C-b % split left/right
# C-b " split top/bottom
# C-b <arrow> move between panes
# C-b z zoom / unzoom the current pane
# C-b Space cycle layouts
# C-b ! move this pane into its own window
tmux split-window -h -c "$PWD" # left/right split, same directory
tmux select-layout main-vertical # big pane left, others stacked rightRemember
- % splits left/right, " splits top/bottom
- C-b z zooms a pane; C-b Space cycles layouts
- Every pane is an independent shell
Watch out for
- Closing a pane with C-b x when you only wanted to hide it; zoom (C-b z) instead.