Skip to content

chaozwn/yazi

Repository files navigation

Install

brew install file yazi ffmpegthumbnailer unar jq poppler fd ripgrep fzf zoxide exiftool bat lazygit lazydocker sevenzip imagemagick font-symbols-only-nerd-font ripgrep-all mediainfo glow
brew tap homebrew/cask-fonts && brew install --cask font-symbols-only-nerd-font
echo 'export PATH="/opt/homebrew/opt/file-formula/bin:$PATH"' >> ~/.zshrc

Add before to shell

zsh/bash

function ff() {
 local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
 yazi "$@" --cwd-file="$tmp"
 if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
  cd -- "$cwd"
 fi
 rm -f -- "$tmp"
}

how to upgrade plugins

# Add the plugin
ya pack -a lpnh/fg

# Install the plugin
ya pack -i

# Upgrade the plugin
ya pack -u

exa

add to .zshrc

eval "$(zoxide init zsh)"

FZF

export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS \
  --highlight-line \
  --info=inline-right \
  --ansi \
  --layout=reverse \
  --border=none
  --color=bg+:#2d3f76 \
  --color=bg:#1e2030 \
  --color=border:#589ed7 \
  --color=fg:#c8d3f5 \
  --color=gutter:#1e2030 \
  --color=header:#ff966c \
  --color=hl+:#65bcff \
  --color=hl:#65bcff \
  --color=info:#545c7e \
  --color=marker:#ff007c \
  --color=pointer:#ff007c \
  --color=prompt:#65bcff \
  --color=query:#c8d3f5:regular \
  --color=scrollbar:#589ed7 \
  --color=separator:#ff966c \
  --color=spinner:#ff007c \
"

Keybindings

:::tip For all keybindings, see the default keymap.toml file. :::

Navigation

To navigate between files and directories you can use the arrow keys , , and or Vim-like keys such as h, j, k, l:

Key binding Alternate key Action
k Move the cursor up
j Move the cursor down
l Enter hovered directory
h Leave the current directory and into its parent

Further navigation commands can be found in the table below.

Key binding Action
K Move the cursor up 5 lines
J Move the cursor down 5 lines
gg Move cursor to the top
G Move cursor to the bottom

Selection

To select files and directories, the following commands are available.

Key binding Action
Space Toggle selection of hovered file/directory
v Enter visual mode (selection mode)
V Enter visual mode (unset mode)
Ctrl + a Select all files
Ctrl + r Inverse selection of all files
Esc Cancel selection

File/directory operations

To interact with selected files/directories use any of the commands below.

Key binding Action
o Open the selected files
O Open the selected files interactively
Enter Open the selected files
Ctrl + Enter Open the selected files interactively (some terminals don't support it yet)
y Yank the selected files (copy)
x Yank the selected files (cut)
p Paste the yanked files
P Paste the yanked files (overwrite if the destination exists)
Y or X Cancel the yank state (unyank)
- Create a symbolic link to the yanked files (absolute path)
_ Create a symbolic link to the yanked files (relative path)
d Move the files to the trash
D Permanently delete the files
a Create a file or directory (ends with "/" for directories)
r Rename a file or directory
; Run a shell command
: Run a shell command (block the UI until the command finishes)
. Toggle the visibility of hidden files
Ctrl + s Cancel the ongoing search
z Jump to a directory using zoxide
Z Jump to a directory, or reveal a file using fzf

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages