Yazi provides multiple ways to select files for batch operations.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.
Quick Selection
Toggle Individual 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
- Move the cursor with
j/kto expand selection - Selected files are added to the selection set
- Use any navigation command to select ranges
Unset Mode
- Files in the range are deselected
- Useful for removing files from an existing selection
Select All Operations
Bulk Selection Commands
| Key | Command | Description |
|---|---|---|
<C-a> | toggle_all --state=on | Select all files in current directory |
<C-r> | toggle_all | Invert selection (toggle all) |
- Select All
- Invert Selection
- 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
- 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: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:| State | Indicator | Description |
|---|---|---|
| Selected | Highlighted | File is in the selection set |
| Visual mode | Different color | Visual mode is active |
| Cursor | Bright highlight | Current cursor position |
Practical Examples
Example 1: Select Specific File Types
Example 2: Select All Except Few Files
Example 3: Multi-Directory Batch Move
Clearing Selection
Working with Selected Files
Once files are selected, you can perform any file operation:- Yank/Cut:
yorx - Delete:
dorD - Open:
oorO - Shell command:
;or: