Overview
Panes allow you to divide a single tab into multiple terminal sessions. WezTerm provides comprehensive pane management through key assignments for splitting, navigating, resizing, and organizing panes.Creating Panes
SplitHorizontal
Split the current pane horizontally (side by side):SpawnTabDomain
Domain to use for the new pane
string[]
Command to run in the new pane
string
Working directory for the new pane
SplitVertical
Split the current pane vertically (top and bottom):SplitPane
Advanced pane splitting with more control:PaneDirection
required
Direction to split:
'Left', 'Right', 'Up', or 'Down'SplitSize
Size of the new pane:
{ Percent = 50 }- Percentage of available space (default: 50){ Cells = 20 }- Fixed number of cells (characters)
SpawnCommand
Command to run in the new pane
boolean
default:"false"
When
true, split the entire tab instead of just the current paneNavigating Panes
ActivatePaneDirection
Move focus to an adjacent pane:string
required
Direction to move focus:
'Left','Right','Up','Down'- Navigate by direction'Next'- Move to next pane in tree order'Prev'- Move to previous pane in tree order
When multiple panes are adjacent in the specified direction, WezTerm selects the most recently activated one
ActivatePaneByIndex
Activate a specific pane by its index:integer
required
Zero-based index of the pane to activate
PaneSelect
Display an interactive pane selector:string
Custom alphabet for pane labels. Defaults to
quick_select_alphabet configPaneSelectMode
What to do with the selected pane:
'Activate'- Switch focus to the pane (default)'SwapWithActive'- Swap positions with active pane'SwapWithActiveKeepFocus'- Swap positions but keep focus on current pane'MoveToNewTab'- Move pane to a new tab'MoveToNewWindow'- Move pane to a new window
boolean
default:"false"
Show pane IDs in the selector
Resizing Panes
AdjustPaneSize
Resize the active pane:This is commonly used with key tables to create a modal resize mode
Resize Mode with Key Tables
Managing Panes
CloseCurrentPane
Close the currently active pane:boolean
default:"false"
When
true, shows a confirmation overlay before closingTogglePaneZoomState
Zoom (maximize) the current pane, hiding others temporarily:SetPaneZoomState
Explicitly set the zoom state:boolean
required
true to zoom the pane, false to unzoomRotatePanes
Rotate pane positions:string
required
'Clockwise'- Rotate panes clockwise'CounterClockwise'- Rotate panes counter-clockwise
Complete Example
Related Actions
- Tab Actions - Manage tabs containing panes
- Scrolling Actions - Scroll through pane output