Yazi: Complete Keyboard Shortcuts Cheat Sheet

Terminal

Yazi: Complete Keyboard Shortcuts Cheat Sheet

Yazi is a terminal file manager written in Rust, featuring Vim-style navigation, real-time previews, and extensive customization. This guide covers all the essential shortcuts you need to master Yazi from scratch.


File navigation

KeyAction
j / Next file
k / Previous file
ggGo to the top of the list
GGo to the bottom of the list
Ctrl+dMove down half a page
Ctrl+uMove up half a page
Ctrl+f / PageDownMove down a full page
Ctrl+b / PageUpMove up a full page

Directory navigation

KeyAction
h / Go back to the parent directory
l / Enter the child directory
HGo back to the previous directory in history
LGo forward in directory history

Quick goto shortcuts

KeyDestination
gh~ (home)
gc~/.config
gd~/Downloads
g SpaceInteractive navigation
gfFollow the focused symlink

Tip: Use z to search with fzf or Z to jump with zoxide — both integrate natively with Yazi.


File operations

KeyAction
o / EnterOpen the selected file(s)
O / Shift+EnterOpen with an interactive application chooser
aCreate a file (end with / to create a directory)
rRename file(s)
dMove to trash
DDelete permanently
yCopy (yank)
xCut
pPaste
PPaste and overwrite if the destination exists
Y / XCancel the yank operation
-Create a symlink using an absolute path
_Create a symlink using a relative path
Ctrl+-Create a hard link

Selection and visual mode

KeyAction
SpaceToggle selection of the current file and move to the next one
vEnter visual selection mode
VEnter visual deselection mode
Ctrl+aSelect all files
Ctrl+rInvert selection
EscExit visual mode or clear the selection

Copying file information

KeyAction
ccCopy the full path
cdCopy the directory path
cfCopy the file name
cnCopy the file name without its extension

Search and filtering

KeyAction
sSearch for files by name using fd
SSearch file contents using ripgrep
Ctrl+sCancel the current search
/Find the next file inline
?Find the previous file inline
nGo to the next result
NGo to the previous result
fFilter files in the current view

Important difference: s and S perform recursive searches in the file system. / and ? only search within the current listing.


Sorting

KeyAction
,mSort by modification date
,MSort by modification date in reverse order
,bSort by creation date
,BSort by creation date in reverse order
,eSort by extension
,ESort by extension in reverse order
,aSort alphabetically
,ASort alphabetically in reverse order
,nNatural sorting, such as file2 before file10
,NNatural sorting in reverse order
,sSort by size
,SSort by size in reverse order
,rRandom sorting

Linemode

Information displayed next to files:

KeyDisplayed information
msSize
mpPermissions
mbCreation date (btime)
mmModification date (mtime)
moOwner
mnNone — clear linemode

Preview and spot mode

KeyAction
TabOpen or close the detailed preview of the focused file
KScroll the preview up
JScroll the preview down

Tabs

KeyAction
tCreate a new tab in the current directory
19Go directly to tab N
[Go to the previous tab
]Go to the next tab
{Swap the current tab with the previous tab
}Swap the current tab with the next tab

Shell and external commands

KeyAction
;Open an interactive shell
:Run a shell command and wait for it to finish
.Toggle hidden file visibility
zJump to a file or directory using fzf
ZJump to a directory using zoxide

Task manager

KeyAction
wOpen or close the task manager
j / kNavigate between tasks
EnterInspect a task
xCancel a task

General

KeyAction
qQuit and save the current directory
QQuit without saving the current directory
Ctrl+cClose the current tab, or quit if it is the last tab
Ctrl+zSuspend the process
~ / F1Open help

Quick visual reference

text
NAVIGATION         FILES              SEARCH
──────────         ─────              ──────
k  ↑ previous      o  open            s  search by name (fd)
j  ↓ next          a  create          S  search contents (rg)
h  ← parent        r  rename          /  find next
l  → child         d  trash           ?  find previous
H  history ←       D  delete          f  filter view
L  history →       y  copy            n  next result
gg top             x  cut             N  previous result
G  bottom          p  paste

SELECTION          TABS               GOTO
─────────          ────               ────
Space  toggle      t  new tab         gh  ~
v      visual      [  previous tab    gc  ~/.config
Ctrl+a all         ]  next tab        gd  ~/Downloads
Ctrl+r invert      1-9 direct tab     z   fzf

Configuring your own shortcuts

Yazi shortcuts are defined in ~/.config/yazi/keymap.toml. To override an existing shortcut or add a new one, edit the file:

toml
[mgr]
keymap = [
  # Custom shortcut: go to projects with gp
  { on = [ "g", "p" ], run = "cd ~/projects", desc = "Go ~/projects" },
]

Note: The configuration uses the prepend model, which means user-defined shortcuts take priority over the defaults.


Yazi is one of the most modern terminal file managers available today. With these shortcuts at your fingertips, navigating the file system becomes as smooth as editing text in Neovim.