Creating Tabs
Create New Tab
- Opens in the same directory as the current tab
- Becomes the active tab immediately
- Has its own independent navigation history
Each tab maintains its own state including:
- Current directory
- Directory history
- Selection state
- Preview state
Switching Tabs
Yazi provides multiple ways to switch between tabs:Direct Tab Switching
Jump directly to a specific tab by number:- Number Keys
- Sequential Switching
Quick access to the first 9 tabs using number keys
1-9.Relative Tab Navigation
- Pressing
[on the first tab switches to the last tab - Pressing
]on the last tab switches to the first tab
Reordering Tabs
Swap the current tab with adjacent tabs:
Example workflow:
Tab swapping changes the order of tabs but doesn’t change which tab is active.
Renaming Tabs
tab_rename --interactive command:
- Opens an input prompt
- Shows the current tab name (if any)
- Allows you to set a custom name for the tab
- Project identification: “frontend”, “backend”, “docs”
- Task tracking: “review”, “testing”, “cleanup”
- Location markers: “home”, “config”, “downloads”
Closing Tabs
- If multiple tabs are open: Closes the current tab
- If only one tab remains: Quits Yazi
- The previous tab becomes active after closing
Tab State Management
Each tab in Yazi maintains independent state:What’s Independent Per Tab
- Current directory: Each tab can be in a different location
- Directory history: Back/forward history is per-tab
- File selection: Selected files are tab-specific
- Preview state: Preview content is independent
- Search/filter: Active searches don’t affect other tabs
What’s Shared Across Tabs
- Yank buffer: Yanked/cut files are global
- Configuration: Settings apply to all tabs
- Tasks: Background tasks are shared
The yank buffer being shared across tabs is a powerful feature - you can yank files in one tab and paste them in another.
Practical Tab Workflows
Workflow 1: Multi-Location File Management
Workflow 2: Organized Project Work
Workflow 3: Comparing Directories
Tab Indicator
Yazi displays tab information in the UI:- Current tab is highlighted
- Tab count is visible
- Custom tab names are displayed (if set)
- Active tab indicator
Implementation Details
Tab management is implemented in/home/daytona/workspace/source/yazi-core/src/mgr/tabs.rs:9. The Tabs struct maintains:
- Current folder state
- Parent folder reference
- Preview state
- History backstack
- Mode (normal/visual)
Tips
- Performance
- Workflow
- Integration
- Yazi tabs are lightweight
- No performance penalty for having many tabs
- Each tab’s preview is loaded on-demand