Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sxyazi/yazi/llms.txt

Use this file to discover all available pages before exploring further.

Yazi supports multiple tabs, allowing you to work in different directories simultaneously.

Creating Tabs

Create New Tab

tt  # Create a new tab in the current working directory
The 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:
KeyCommandDescription
1tab_switch 0Switch to 1st tab
2tab_switch 1Switch to 2nd tab
3tab_switch 2Switch to 3rd tab
4tab_switch 3Switch to 4th tab
5tab_switch 4Switch to 5th tab
6tab_switch 5Switch to 6th tab
7tab_switch 6Switch to 7th tab
8tab_switch 7Switch to 8th tab
9tab_switch 8Switch to 9th tab
Quick access to the first 9 tabs using number keys 1-9.
2  # Jump to second tab
5  # Jump to fifth tab

Relative Tab Navigation

[  # Switch to previous tab (wraps around)
]  # Switch to next tab (wraps around)
Relative navigation wraps around:
  • 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:
KeyCommandDescription
{tab_swap -1Swap current tab with previous tab
}tab_swap 1Swap current tab with next tab
Example workflow:
# Move current tab to the left
{  # Swap with previous tab
{  # Swap again

# Move current tab to the right
}  # Swap with next tab
Tab swapping changes the order of tabs but doesn’t change which tab is active.

Renaming Tabs

tr  # Rename current tab interactively
The 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
Use cases for tab names:
  • Project identification: “frontend”, “backend”, “docs”
  • Task tracking: “review”, “testing”, “cleanup”
  • Location markers: “home”, “config”, “downloads”

Closing Tabs

<C-c>  # Close current tab (or quit if it's the last tab)
Behavior:
  • If multiple tabs are open: Closes the current tab
  • If only one tab remains: Quits Yazi
  • The previous tab becomes active after closing
Closing a tab discards its state including:
  • Navigation history
  • Selection state
  • Unsaved filter/search
Make sure to complete operations before closing a tab.

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

# Tab 1: Source directory
cd ~/projects/old-project
y    # Yank files

# Create new tab for destination
tt
cd ~/projects/new-project
p    # Paste files

# Tab 2 still has the source directory open
[    # Go back to review

Workflow 2: Organized Project Work

# Set up tabs for a project
1    # Tab 1: project root
cd ~/projects/myapp
tr "root"

tt   # Tab 2: source code
cd src/
tr "src"

tt   # Tab 3: documentation
cd docs/
tr "docs"

# Quick navigation
1    # Jump to project root
2    # Jump to source
3    # Jump to docs

Workflow 3: Comparing Directories

# Open two related directories
cd /path/to/version1

tt
cd /path/to/version2

# Switch between them
[    # version1
]    # version2

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:
pub struct Tabs {
    pub cursor: usize,      // Active tab index
    pub items: Vec<Tab>,    // All tab instances
}
Each tab is independent with its own:
  • Current folder state
  • Parent folder reference
  • Preview state
  • History backstack
  • Mode (normal/visual)

Tips

  • Yazi tabs are lightweight
  • No performance penalty for having many tabs
  • Each tab’s preview is loaded on-demand

Build docs developers (and LLMs) love