Skip to content

SOP-004: Pane Management

Fresh
FieldValue
Document IDSOP-004
Version1.1
StatusActive
tmux Version3.6b
Last Updated2026-05-26

Purpose

Split windows into multiple panes for simultaneous viewing and working.

Prerequisites

  • tmux installed (SOP-001)
  • Active tmux session with at least one window

Pane Layouts

Procedure

Splitting Panes

ShortcutCommandResult
Ctrl+b %:split-window -hSplit left/right
Ctrl+b ":split-window -vSplit top/bottom

Memory Aid

  • % looks like two circles side by side (horizontal split)
  • " looks like two lines stacked (vertical split)
ShortcutAction
Ctrl+b arrowMove to pane in direction
Ctrl+b oNext pane (cycle)
Ctrl+b ;Toggle last active pane
Ctrl+b qShow pane numbers
Ctrl+b q 0-9Switch to pane number

Resizing Panes

ShortcutAction
Ctrl+b Ctrl+arrowResize in direction (1 cell)
Ctrl+b Alt+arrowResize in direction (5 cells)

Or use resize commands:

bash
:resize-pane -D 10    # Down 10 cells
:resize-pane -U 10    # Up 10 cells
:resize-pane -L 10    # Left 10 cells
:resize-pane -R 10    # Right 10 cells

Pane Layouts

Cycle through preset layouts with Ctrl+b Space:

LayoutDescription
even-horizontalPanes arranged left to right, equal width
even-verticalPanes arranged top to bottom, equal height
main-horizontalLarge pane on top, others below
main-verticalLarge pane on left, others right
tiledPanes in grid pattern

Limit Tiled Columns New in 3.6

Cap how wide the tiled layout grows before stacking panes into extra rows:

bash
# Never use more than 3 columns; extra panes stack in new rows
setw -g tiled-layout-max-columns 3

# 0 (the default) means no limit
setw -g tiled-layout-max-columns 0

Pane Scrollbars New in 3.6

tmux 3.6 adds a character based scrollbar per pane, with a draggable slider that reflects scroll position and content size.

bash
# Always visible (pane is narrowed and text reflowed)
set -g pane-scrollbars on

# Visible only in copy mode or view mode
set -g pane-scrollbars modal

# Off (default)
set -g pane-scrollbars off

# Which side to show the scrollbar on
set -g pane-scrollbars-position right    # or left

# Colours and sizing: fg = slider, bg = track; width and pad attributes
set -g pane-scrollbars-style 'fg=#89b4fa,bg=#313244,width=1,pad=0'
ValueBehavior
offNo scrollbar (default)
onVisible all the time
modalAppears only in copy or view mode

TIP

modal is the least intrusive choice: scrollbars only show up when you scroll back, so your normal pane width is unchanged.

Zoom Pane

Toggle fullscreen for current pane:

bash
Ctrl+b z    # Toggle zoom

INFO

When zoomed, the pane indicator shows [Z] in the status bar. Press Ctrl+b z again to unzoom.

Moving Panes

ShortcutAction
Ctrl+b {Move pane left
Ctrl+b }Move pane right
Ctrl+b !Convert pane to window

Joining Panes

Merge panes from different windows:

bash
# Join window 2 into window 1 as panes
:join-pane -s 2 -t 1

# Move specific pane between windows
:join-pane -s 2.1 -t 1.0

Synchronize Panes

Send the same command to all panes:

bash
:setw synchronize-panes on    # Enable
:setw synchronize-panes off   # Disable
:setw synchronize-panes       # Toggle

WARNING

Be careful with synchronized panes - every keystroke goes to ALL panes!

Closing Panes

MethodAction
Ctrl+b xClose pane (with confirmation)
exit or Ctrl+dClose pane (no confirmation)

Pane Workflow Example

Practical Layout Example

Create an IDE-like layout:

bash
# Start in a window
# Split for file explorer (left narrow)
Ctrl+b %
:resize-pane -L 30

# In right pane, split for terminal (bottom)
Ctrl+b "
:resize-pane -D 10

# Result:
# +--------+------------------+
# |        |                  |
# | Files  |     Editor       |
# |        |                  |
# |        +------------------+
# |        |    Terminal      |
# +--------+------------------+

Verification

Show current pane arrangement:

bash
# Display pane numbers briefly
Ctrl+b q

# List panes in window
tmux list-panes
# Output: 0: [80x24] [active]
#         1: [80x24]

Troubleshooting

Pane too small to split

Solution

The pane needs minimum dimensions. Try:

  • Zooming out of the terminal
  • Closing other panes first
  • Using a larger terminal window

Lost track of which pane is active

Solution

Press Ctrl+b q to display pane numbers. The active pane number is highlighted.

Want to swap two panes

Solution

bash
# Swap current pane with previous
:swap-pane -U

# Swap current pane with next
:swap-pane -D

# Swap pane 0 with pane 1
:swap-pane -s 0 -t 1

See Also

Generated with AI-powered SOP Generator