Overview
Tab-related key assignments allow you to manage multiple terminal sessions within a single window. WezTerm provides actions for creating tabs, switching between them, closing them, and rearranging their order.Creating Tabs
SpawnTab
Create a new tab in the current window:Specifies which domain to use for the new tab:
'CurrentPaneDomain'- Use the domain of the current pane (default)'DefaultDomain'- Use the default domain{ DomainName = 'name' }- Use a specific domain by name
SpawnCommandInNewTab
Create a new tab and run a specific command:Command and arguments to run in the new tab
Working directory for the command
Optional descriptive label for the command
Which domain to spawn the tab in
Navigating Tabs
ActivateTab
Activate a specific tab by index (0-based):Negative indices are supported:
-1 activates the rightmost tab, -2 the second from right, etc.ActivateTabRelative
Move to a tab relative to the current one:Number of tabs to move. Positive values move right, negative move left. Wraps around at the ends.
ActivateTabRelativeNoWrap
Same asActivateTabRelative, but doesn’t wrap around:
ActivateLastTab
Switch to the most recently active tab:Managing Tabs
CloseCurrentTab
Close the currently active tab:When
true, shows a confirmation overlay before closing the tabMoveTab
Move the current tab to a specific position:The target position (0-based index) for the tab
MoveTabRelative
Move the current tab relative to its current position:Number of positions to move. Positive values move right, negative move left.
Tab Navigation UI
ShowTabNavigator
Display a visual tab navigator overlay:Complete Example
Here’s a comprehensive tab management configuration:Related Actions
- Pane Actions - Split tabs into multiple panes
- Workspaces - Organize multiple windows into workspaces