Resize panes
The left pane is at least 80 columns wide.
Three sizes of step, all of them resize-pane:
C-b C-Left/C-Right/C-Up/C-Down- move the border one cell
C-b M-Leftand friends (Alt)- move it five cells
resize-pane -R 20atC-b :- any exact count
The arrow names the direction the border moves, not which pane grows. To make the left pane wider, push its right border right.
Resizing moves a border, taking columns or rows from the neighbour, so growing one pane always shrinks another. After one C-b, further arrow presses repeat without another prefix.
Press C-b C-Right, then keep tapping C-Right.
The border moves right a column at a time.
Press C-b M-Right a few times.
Five columns per press, until the left pane passes 80 of the 120 columns.
If neither moved the border, press C-b :, type resize-pane -R 20, Enter.
The border jumps 20 columns at once.
Why the resize keys repeat
The arrows repeat because they are bound with the repeat flag: presses within repeat-time (500 ms) count as one sequence.
Not every terminal passes Ctrl or Alt plus arrows through to tmux. The prompt form works everywhere, which is why it is worth knowing.
Here is what just happened.
C-b C-Right runs resize-pane -R, C-b M-Right runs resize-pane -R 5, both on the active pane. With the right pane active, -L would shrink it and grow the left pane instead: the border moved is the same, the pane it belongs to differs. Check which pane is active before resizing.
- Resize the active pane by one cell in that directionC-bthenC-Left
- Resize the active pane by five cells in that directionC-bthenM-Left
- Resize by any number of cells from the prompt; the fallback when Alt or Ctrl arrows do not reach tmux:resize-pane -R 20
Go further
resize-pane -x 100sets an absolute width;-ya height;-x 50%a percentage.select-layoutresizes every pane in the window at once, using a preset.
- 1The arrow names the direction the border moves. To grow the left pane, push its right border right:
C-b C-RightorC-b M-Right. - 2
C-Rightmoves one column,M-Rightfive. After oneC-b, keep tapping the arrow: it repeats without another prefix. - 3If Ctrl or Alt arrows never reach tmux, use
C-b :andresize-pane -R 20.
This is a live terminal. Typing goes to the machine, including Tab. Press Shift and Tab together to move focus back out to the page.
A real terminal, in this tab
Alpine Linux and tmux 3.4 on an x86 emulator. Nothing to install, and no server behind it.
about 15 MB, once
Done when
not started- The left pane of window 0 in session learn is at least 80 columns wide— not done yet