Skip to main content

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.
Windows may be split horizontally or vertically, and panes can be resized, moved, and arranged in various layouts.

Pane Architecture

From window.c:930-973, panes are created with:

Creating Panes

Splitting Windows

From the man page default key bindings (tmux.1:284-292):
  • Prefix " - Split the current pane into two, top and bottom
  • Prefix % - Split the current pane into two, left and right
  • Prefix ! - 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)
From window.c:906-928:
The pane ID is passed to the child process in the TMUX_PANE environment variable.

Key Bindings

From the man page (tmux.1:313-376):
  • Prefix o - Select the next pane in the current window
  • Prefix ; - Move to the previously active pane
  • Prefix Up/Down/Left/Right - Change to the pane in that direction
  • Prefix q - Briefly display pane indexes

Selecting Panes

From the man page (tmux.1:847-878), special pane tokens:

Pane Selection Logic

From window.c:1387-1610, directional pane finding:

Resizing Panes

From the man page (tmux.1:391-396):
From window.c:1080-1106:

Pane Layouts

From layout-set.c:39-50, tmux provides seven preset layouts:

Applying Layouts

From the man page (tmux.1:377-384):
Panes are spread out evenly from left to right across the window.

Swapping and Moving Panes

From the man page (tmux.1:363-366):
  • Prefix { - Swap the current pane with the previous pane
  • Prefix } - Swap the current pane with the next pane

Rotating Panes

Zooming Panes

From window.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:
From 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:
From the man page (tmux.1:338-342):
  • Prefix m - Mark the current pane
  • Prefix M - Clear the marked pane

Capturing Pane Content

Pane Numbers

From window.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

  1. Plan your layout: Think about workflow before splitting
  2. Use preset layouts: Leverage built-in layouts for common patterns
  3. Name your panes: Use pane-border-format for context
  4. Master navigation: Learn directional selection for efficiency
  5. Zoom when needed: Use zoom for temporary full-screen focus
  6. Synchronize carefully: Remember to disable synchronization when done
  7. Set sensible sizes: Use percentage-based splits for flexibility