Skip to main content
Yazi provides multiple ways to select files for batch operations.

Quick Selection

Toggle Individual Files

This is the fastest way to select multiple files:
  • Moves cursor down automatically after toggling
  • Works in normal mode
  • Can be pressed multiple times rapidly

Visual Mode

Yazi implements Vim-style visual selection with two modes:

Select Mode

In select mode:
  • Move the cursor with j/k to expand selection
  • Selected files are added to the selection set
  • Use any navigation command to select ranges
1

Enter select mode

Press v on the starting file
2

Expand selection

Use j/k or other navigation keys to select more files
3

Exit visual mode

Press <Esc> to exit and keep the selection

Unset Mode

Unset mode works inversely:
  • Files in the range are deselected
  • Useful for removing files from an existing selection
Example workflow:

Select All Operations

Bulk Selection Commands

Selects every file in the current directory. Useful for:
  • Batch operations on entire directories
  • Starting point for unset mode to exclude specific files

Visual Mode Details

How Visual Mode Works

Yazi’s visual mode is implemented in /home/daytona/workspace/source/yazi-core/src/tab/mode.rs:7:
  • Select mode: Mode::Select(start, indices) - Adds files to selection
  • Unset mode: Mode::Unset(start, indices) - Removes files from selection
  • Normal mode: Mode::Normal - Standard navigation

Exiting Visual Mode

The selection persists after exiting visual mode, allowing you to:
  • Navigate to other directories
  • Perform operations on the selected files
  • Add more files to the selection later

Cross-Directory Selection

One of Yazi’s powerful features is the ability to select files across multiple directories:
1

Select files in first directory

2

Navigate to another directory

3

Select more files

4

Perform operation

Selected files remain in the selection set even when you navigate away from their directory. This enables complex multi-directory operations.

Selection Indicators

Visual Feedback

Yazi provides clear visual indicators for selection state:

Practical Examples

Example 1: Select Specific File Types

Example 2: Select All Except Few Files

Example 3: Multi-Directory Batch Move

Clearing Selection

The escape key has multiple functions depending on context:
  • In visual mode: Exit visual mode (keep selection)
  • In normal mode: Clear all selections
  • During search: Cancel search

Working with Selected Files

Once files are selected, you can perform any file operation:
  • Yank/Cut: y or x
  • Delete: d or D
  • Open: o or O
  • Shell command: ; or :
All operations apply to the entire selection set, regardless of which directory the files are in.