Skip to content

DreamMaoMao/keyjump.yazi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

keyjump.yazi

A Yazi plugin like flash.nvim in Neovim, allows precise navigation using single (or double) characters.

Note

The latest main branch of Yazi is required at the moment.

The plug-in has been converted to asynchronous plug-in, so if you configured the --sync parameter before, please remove this parameter

Global mode

Global mode, you can jump to everywhere.not only current window. you also can use "Space" key to select/unselect item

2024-02-07.15-34-23.mp4

Keep mode

keep mode, when select a dir, it will auto enter and keep in "keyjump" mode.

2024-02-04.14-14-09.mp4

Normal mode

Normal mode, when select a item, it will auto leave keyjump mode

2024-02-03.12-00-43.mp4

Select mode

Select mode, you can use "Space" key to select/unselect item

2024-02-06.18-13-01.mp4

special key

"Esc"  : exit keyjump (global,select,keep,normal)
"z"  : exit keyjump (global,select,keep,normal)

"Enter" : open (global,select,keep,normal)
"Space" : toggle select (global,select,keep,normal)
"Left" : leave to parent folder (global,select,keep,normal)
"Right" : enter folder (global,select,keep,normal)
"Up" : arrow up 1 entry (global,select,keep,normal)
"Down" : arrow down 1 entry (global,select,keep,normal)
"alt+k" : seek up 5 entry (global,select,keep,normal)
"alt+j" : seek down 5 entry (global,select,keep,normal)
"ctrl+k" : prev page (global,select,keep,normal)
"ctrl+j" : next page entry (global,select,keep,normal)
"K" : arrow up 5 entry (global,select,keep,normal)
"J" : arrow down 5 entry (global,select,keep,normal)

"h" : leave to parent folder (global)
"l" : enter folder (global)
"k" : arrow up 1 entry (global)
"j" : arrow down 1 entry (global)


Install

Linux

git clone https://github.com/DreamMaoMao/keyjump.yazi.git ~/.config/yazi/plugins/keyjump.yazi

Windows

With Powershell :

if (!(Test-Path $env:APPDATA\yazi\config\plugins\)) {mkdir $env:APPDATA\yazi\config\plugins\}
git clone https://github.com/DreamMaoMao/keyjump.yazi.git $env:APPDATA\yazi\config\plugins\keyjump.yazi

Usage

set shortcut key to toggle keyjump mode in ~/.config/yazi/keymap.toml. for example set i to toggle keyjump mode

[[manager.prepend_keymap]]
on   = [ "i" ]
run  = "plugin keyjump --args=keep"
desc = "Keyjump (Keep mode)"
[[manager.prepend_keymap]]
on   = [ "i" ]
run  = "plugin keyjump"
desc = "Keyjump (Normal mode)"
[[manager.prepend_keymap]]
on   = [ "i" ]
run  = "plugin keyjump --args=select"
desc = "Keyjump (Select mode)"
[[manager.prepend_keymap]]
on   = [ "i" ]
run  = "plugin keyjump --args=global"
desc = "Keyjump (Global mode)"
[[manager.prepend_keymap]]
on   = [ "i" ]
run  = "plugin keyjump --args='global once'"
desc = "Keyjump (once Global mode)"

opts setting (~/.config/yazi/init.lua)

require("keyjump"):setup {
	icon_fg = "#fda1a1",
}

When you see some character(singal character or double character) in left of the entry. Press the key of the character will jump to the corresponding entry