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):Domain to use for the new pane
Command to run in the new pane
Working directory for the new pane
SplitVertical
Split the current pane vertically (top and bottom):SplitPane
Advanced pane splitting with more control:Direction to split:
'Left', 'Right', 'Up', or 'Down'Size of the new pane:
{ Percent = 50 }- Percentage of available space (default: 50){ Cells = 20 }- Fixed number of cells (characters)
Command to run in the new pane
When
true, split the entire tab instead of just the current paneNavigating Panes
ActivatePaneDirection
Move focus to an adjacent pane: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:Zero-based index of the pane to activate
PaneSelect
Display an interactive pane selector:Custom alphabet for pane labels. Defaults to
quick_select_alphabet configWhat 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
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:When
true, shows a confirmation overlay before closingTogglePaneZoomState
Zoom (maximize) the current pane, hiding others temporarily:SetPaneZoomState
Explicitly set the zoom state:true to zoom the pane, false to unzoomRotatePanes
Rotate pane positions:'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