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 provides multiple search methods for finding files and content, with deep integration into popular command-line tools.

Quick Find

Find files by name in the current directory:
KeyCommandDescription
/find --smartFind next file (forward search)
?find --previous --smartFind previous file (backward search)
nfind_arrowJump to next match
Nfind_arrow --previousJump to previous match
1

Start search

Press / (forward) or ? (backward)
2

Type pattern

Enter the search pattern (smart case matching)
3

Navigate matches

  • Press n to go to next match
  • Press N to go to previous match
  • Matches are highlighted with indicators
4

Cancel search

Press <Esc> or <C-s> to exit search mode

Smart Case Matching

The --smart flag enables smart case sensitivity:
  • Lowercase pattern: Case-insensitive matching
    • /readme matches “README”, “readme”, “ReadMe”
  • Mixed case pattern: Case-sensitive matching
    • /ReadMe only matches “ReadMe”

Filter

Filter files in the current directory to show only matches:
f  # Start filter with smart case
Filter vs Find:
Hides non-matching files
f        # Start filter
*.rs     # Only Rust files visible
  • 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 using fd (faster alternative to find):
s  # Search files via fd
The search --via=fd command:
  • Recursively searches from the current directory
  • Respects .gitignore by default
  • Supports regex patterns
  • Much faster than traditional find
Example patterns:
s *.toml           # Find all TOML files
s README           # Find files named README
s ^test            # Files starting with "test"

fd Features

  • Fast: Uses parallel directory traversal
  • Smart: Ignores hidden files and .gitignore patterns
  • Colorful: Syntax-highlighted results
  • Regex: Full regular expression support

Search with ripgrep

Search file contents using ripgrep:
S  # Search file contents via ripgrep (capital S)
The search --via=rg command:
  • Searches inside file contents
  • Extremely fast, even on large codebases
  • Respects .gitignore
  • Returns files containing the pattern
Example searches:
S TODO             # Files containing "TODO"
S fn main          # Rust files with main function
S "error handling" # Files with exact phrase
s  # Search by filename
Use when you:
  • Know the filename
  • Want to find specific file types
  • Need path-based matching

Jump with fzf

Fuzzy find files and directories using fzf:
z  # Jump to file/directory with fzf
The fzf integration provides:
  • 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

1

Launch fzf

Press z to open the fzf interface
2

Type query

Enter fuzzy search terms (spaces for AND logic)
src main rs  # Matches "src/main.rs"
cfg toml     # Matches config.toml, yazi.toml, etc.
3

Navigate results

  • <Up>/<Down> or <C-j>/<C-k> to move
  • <Tab> to select multiple files
  • <Enter> to confirm
4

Result action

  • Single file: Navigates to it or opens it
  • Directory: Changes to that directory
  • Multiple selections: Toggles them in Yazi

fzf with Selection

If files are already selected when launching fzf:
<Space>  # Select some files
<Space>
z        # Launch fzf with selected files as input
This lets you:
  • 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 with zoxide:
Z  # Jump via zoxide (capital Z)
zoxide features:
  • Frecency algorithm: Ranks by frequency and recency
  • Smart matching: Type partial directory names
  • Learning: Automatically tracks your navigation patterns
Example:
Z proj     # Jumps to ~/projects (if frequently visited)
Z conf     # Jumps to ~/.config
Z doc      # Jumps to ~/Documents
Stop ongoing searches:
<C-s>  # Cancel the ongoing search
<Esc>  # Exit search mode or clear filter
Context<Esc> behavior<C-s> behavior
Active searchExit search modeCancel search operation
Filter activeClear filterN/A
Find resultsClear highlightsClear highlights

Search Methods Comparison

MethodKeyToolScopeUse Case
Find/Built-inCurrent directoryQuick file jumps
FilterfBuilt-inCurrent directoryFocus on file subset
fdsfdRecursiveFind files by name
ripgrepSripgrepRecursive contentFind by file contents
fzfzfzfRecursiveFuzzy interactive search
zoxideZzoxideDatabaseJump to frequent directories

Search Tips

  • fd and ripgrep are extremely fast even on large directories
  • Filter is instant since it only processes visible files
  • fzf builds an index on-demand for responsive searching

Advanced Search Examples

Example 1: Find and Select All Markdown Files

f        # Start filter
*.md     # Show only .md files
<C-a>    # Select all visible files
<Esc>    # Clear filter (selection persists)
y        # Yank selected .md files

Example 2: Search Code for TODOs

S        # Search with ripgrep
TODO     # Find all TODOs
# Yazi shows files containing TODO
<Enter>  # Open first file
s                    # fd search
^(test|spec).*\.rs$  # Find Rust test files

Example 4: Multi-Tool Workflow

Z        # Jump to project directory with zoxide
S        # Search for "FIXME" in code
z        # Use fzf to narrow down results
<Tab>    # Multi-select files in fzf
<Enter>  # Files are now selected in Yazi
o        # Open all selected files
Make sure fd, ripgrep, fzf, and zoxide are installed on your system for their respective search features to work.

Build docs developers (and LLMs) love