Skip to content
/ fdp.yazi Public

a Yazi plugin that integrates `fzf` and `fd`, with `eza` and `bat` previews

License

Notifications You must be signed in to change notification settings

lpnh/fdp.yazi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fdp.yazi

Note

this plugin is only guaranteed to be compatible with Yazi nightly

a Yazi plugin that integrates fzf and fd, with eza and bat previews

supports: bash, fish, and zsh

dependencies

installation

ya pack -a lpnh/fdp

usage

plugin args

this plugin supports four arguments:

  • cwd: limits the search to the current directory
  • all: searches for both files and directories
  • dir: searches for directories only
  • file: searches for files only

below is an example of how to configure them in the ~/.config/yazi/keymap.toml file:

[[manager.prepend_keymap]]
on = ["f", "a"]
run = "plugin fdp all"
desc = "fd search (all)"

[[manager.prepend_keymap]]
on = ["f", "c"]
run = "plugin fdp cwd"
desc = "fd search (CWD)"

[[manager.prepend_keymap]]
on = ["f", "d"]
run = "plugin fdp dir"
desc = "fd search (dirs)"

[[manager.prepend_keymap]]
on = ["f", "f"]
run = "plugin fdp file"
desc = "fd search (files)"

fzf binds

this plugin provides the following custom fzf keybindings:

  • ctrl-s: toggle fzf match search for the current query results
  • ctrl-]: toggle the preview window size (66%, 80%)
  • ctrl-\: toggle the preview window position (top, right)
  • alt-m: switch the preview to "metadata" with eza -l
  • alt-c: switch the preview to "content" with eza or bat (default)

customization

color themes

fzf

you can customize the default fzf colors using the FZF_DEFAULT_OPTS environment variable. for an example, check out Catppuccin's fzf repo

more examples of color themes can be found in the fzf documentation

eza

you can customize the colors of eza previews using its ~/.config/eza/theme.yml configuration file. check the eza-theme repository for some existing themes

for more details, see eza_colors-explanation

acknowledgments

thanks @prosoitos for the inspiration

About

a Yazi plugin that integrates `fzf` and `fd`, with `eza` and `bat` previews

Topics

Resources

License

Stars

Watchers

Forks

Languages