Terminal: Yazi
Yazi is a Terminal-based file manager. It also has a few Vim-related key maps so it kind of fits into my little mini series of articles around the Term.
It has a column of files and folders on the left, a list of the files and folders in the current path in the middle, and a preview of the file on the right hand side.
It also has support for Vim key bindings, which makes it quite intuitive to navigate if you have spent some time in Vim or Neovim. You use y to yank (copy) a file, you use p to paste, etc.
Install
Install all dependencies and Yazi with Homebrew:
brew install yazi ffmpeg sevenzip jq poppler fd ripgrep fzf zoxide imagemagick font-symbols-only-nerd-font
brew install yazi --HEAD
Default configuration files
Copy and paste these files to your own configuration and change the things you like.
~/.config/yazi/theme.toml~/.config/yazi/keymap.toml~/.config/yazi/yazi.toml
Plugins
- The mactag.yazi plugin enables the Mac’s tagging feature in Yazi
- The jump-to-char.yazi plugin enables an ‘f’ command to jump to the next file that starts with a specific character.
Use Yazi as a Tmux popup
When using Tmux, you can use Yazi in a "popup". This means we can bind a shortcut (I have Tmux <Prefix> + y for Yazi), which gives me an easy-to-reach file explorer in all situations.
You can do this in your .tmux.conf file.
bind C-y display-popup \
-d "#{pane_current_path}" \
-w 75% \
-h 75% \
-E "yazi"