Skip to content

Yazi plugin for skipping directories with only a single sub-directory

License

Notifications You must be signed in to change notification settings

Rolv-Apneseth/bypass.yazi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bypass.yazi

Yazi plugin for bidirectional skipping of directories which only have a single subdirectory

Note

This might be a little inconsistent for now as I'm currently using a (lazy) workaround to Yazi, for the time being, not having a way to tell if a directory is loaded. This will be fixed with Yazi v0.2.6.

bypass.mp4

Requirements

Installation

Linux / MacOS

git clone https://github.com/Rolv-Apneseth/bypass.yazi.git ~/.config/yazi/plugins/bypass.yazi

Windows

git clone https://github.com/Rolv-Apneseth/bypass.yazi.git %AppData%\yazi\config\plugins\bypass.yazi

Usage

Add this to your keymap.toml:

[[manager.prepend_keymap]]
on = [ "L" ]
run = "plugin bypass"
desc = "Recursively enter child directory, skipping children with only a single subdirectory"
[[manager.prepend_keymap]]
on = [ "H" ]
run = "plugin bypass --args=reverse"
desc = "Recursively enter parent directory, skipping parents with only a single subdirectory"

And that's it. You can bind any key you like, including overriding the default enter and leave bindings by setting them to l and h respectively.

Note that if you're using the smart enter tip from the documentation, this plugin can replace that entirely by using this keybind instead:

[[manager.prepend_keymap]]
on = [ "l" ]
run = "plugin bypass --args=smart_enter"
desc = "Open a file, or recursively enter child directory, skipping children with only a single subdirectory"

About

Yazi plugin for skipping directories with only a single sub-directory

Resources

License

Stars

Watchers

Forks

Languages