Yazi provides multiple search methods for finding files and content, with deep integration into popular command-line tools.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 Find
Find files by name in the current directory:Forward and Backward Search
| Key | Command | Description |
|---|---|---|
/ | find --smart | Find next file (forward search) |
? | find --previous --smart | Find previous file (backward search) |
n | find_arrow | Jump to next match |
N | find_arrow --previous | Jump to previous match |
Navigate matches
- Press
nto go to next match - Press
Nto go to previous match - Matches are highlighted with indicators
Smart Case Matching
The--smart flag enables smart case sensitivity:
- Lowercase pattern: Case-insensitive matching
/readmematches “README”, “readme”, “ReadMe”
- Mixed case pattern: Case-sensitive matching
/ReadMeonly matches “ReadMe”
Filter
Filter files in the current directory to show only matches:- Filter
- Find
Hides non-matching files
- Changes what files are displayed
- Useful for focusing on specific file types
- Affects operations like select all
Filtered files are temporarily hidden but not deleted. Clear the filter with
<Esc> to show all files again.Search with fd
Search for files usingfd (faster alternative to find):
search --via=fd command:
- Recursively searches from the current directory
- Respects
.gitignoreby default - Supports regex patterns
- Much faster than traditional
find
fd Features
- Fast: Uses parallel directory traversal
- Smart: Ignores hidden files and
.gitignorepatterns - Colorful: Syntax-highlighted results
- Regex: Full regular expression support
Search with ripgrep
Search file contents usingripgrep:
search --via=rg command:
- Searches inside file contents
- Extremely fast, even on large codebases
- Respects
.gitignore - Returns files containing the pattern
- fd (filename)
- ripgrep (content)
- Know the filename
- Want to find specific file types
- Need path-based matching
Jump with fzf
Fuzzy find files and directories usingfzf:
- Fuzzy matching: Type partial names in any order
- Interactive preview: See file contents as you search
- Fast filtering: Real-time results as you type
- Multi-select: Select multiple files with
<Tab>
fzf Workflow
Navigate results
<Up>/<Down>or<C-j>/<C-k>to move<Tab>to select multiple files<Enter>to confirm
fzf with Selection
If files are already selected when launching fzf:- Further filter your selection
- Remove specific files from selection
- Add to existing selection
The fzf plugin is implemented in
/home/daytona/workspace/source/yazi-plugin/preset/plugins/fzf.lua:11. It uses multi-select mode (-m flag) by default.Jump with zoxide
Jump to frequently used directories withzoxide:
- Frecency algorithm: Ranks by frequency and recency
- Smart matching: Type partial directory names
- Learning: Automatically tracks your navigation patterns
Cancel Search
Stop ongoing searches:| Context | <Esc> behavior | <C-s> behavior |
|---|---|---|
| Active search | Exit search mode | Cancel search operation |
| Filter active | Clear filter | N/A |
| Find results | Clear highlights | Clear highlights |
Search Methods Comparison
| Method | Key | Tool | Scope | Use Case |
|---|---|---|---|---|
| Find | / | Built-in | Current directory | Quick file jumps |
| Filter | f | Built-in | Current directory | Focus on file subset |
| fd | s | fd | Recursive | Find files by name |
| ripgrep | S | ripgrep | Recursive content | Find by file contents |
| fzf | z | fzf | Recursive | Fuzzy interactive search |
| zoxide | Z | zoxide | Database | Jump to frequent directories |
Search Tips
- Performance
- Patterns
- Integration
fdandripgrepare extremely fast even on large directories- Filter is instant since it only processes visible files
- fzf builds an index on-demand for responsive searching