Overview
Panes are rectangular subdivisions of a tmux window, each containing an independent pseudo terminal. From the man page (tmux.1:1722-1749):Each pane takes up a certain area of the display and is a separate terminal. A window may be split into panes using the split-window command.
Pane Architecture
Fromwindow.c:930-973, panes are created with:
Creating Panes
Splitting Windows
Prefix "- Split the current pane into two, top and bottomPrefix %- Split the current pane into two, left and rightPrefix !- Break the current pane out of the window
Pane Identification
Panes are identified by:- Pane ID: Prefixed with
%(e.g.,%0,%1) - unique and unchanging - Pane index: Position within window (starting at 0 by default)
window.c:906-928:
The pane ID is passed to the child process in the
TMUX_PANE environment variable.Navigating Panes
Key Bindings
From the man page (tmux.1:313-376):Prefix o- Select the next pane in the current windowPrefix ;- Move to the previously active panePrefix Up/Down/Left/Right- Change to the pane in that directionPrefix q- Briefly display pane indexes
Selecting Panes
From the man page (tmux.1:847-878), special pane tokens:Pane Selection Logic
Fromwindow.c:1387-1610, directional pane finding:
Resizing Panes
From the man page (tmux.1:391-396):window.c:1080-1106:
Pane Layouts
Fromlayout-set.c:39-50, tmux provides seven preset layouts:
Applying Layouts
From the man page (tmux.1:377-384):- even-horizontal
- even-vertical
- main-horizontal
- main-vertical
- tiled
Panes are spread out evenly from left to right across the window.
Swapping and Moving Panes
Prefix {- Swap the current pane with the previous panePrefix }- Swap the current pane with the next pane
Rotating Panes
Zooming Panes
Fromwindow.c:656-681, panes can be temporarily zoomed:
Zooming a pane temporarily makes it occupy the entire window. The flag
Z appears in the status line when a pane is zoomed.Pane Synchronization
Send input to all panes in a window simultaneously:window.c:1189-1220, synchronized input is copied to all visible panes:
Pane Borders
Customize pane border appearance:Pane Marking
Mark a pane for commands that target marked panes:Prefix m- Mark the current panePrefix M- Clear the marked pane
Capturing Pane Content
Pane Numbers
Fromwindow.c:1749 and the man page:
Panes are numbered beginning from zero in the order they are created. The
pane-base-index option can change the starting index.Best Practices
- Plan your layout: Think about workflow before splitting
- Use preset layouts: Leverage built-in layouts for common patterns
- Name your panes: Use
pane-border-formatfor context - Master navigation: Learn directional selection for efficiency
- Zoom when needed: Use zoom for temporary full-screen focus
- Synchronize carefully: Remember to disable synchronization when done
- Set sensible sizes: Use percentage-based splits for flexibility