[yazi] Add nav in parent dir
This commit is contained in:
1 parent
a7e0f242c2
commit
6dec3bf52d
2 files changed
+39
-7
No files matched your search
@@ -1,7 +1,27 @@
|
|||||||
[mgr]
|
[[mgr.prepend_keymap]]
|
||||||
prepend_keymap = [
|
on = "\\"
|
||||||
{ on = "\\", run = "plugin split-tabs spl_toggle", desc = "Dual-pane: toggle" },
|
run = "plugin split-tabs spl_toggle"
|
||||||
{ on = "<Tab>", run = "plugin split-tabs spl_switch_tab", desc = "Dual-pane: switch pane" },
|
desc = "Dual-pane: toggle"
|
||||||
{ on = "P", run = "plugin split-tabs spl_preview", desc = "Dual-pane: toggle bottom preview" },
|
|
||||||
{ on = "<C-g>", run = "shell -- rofi -theme fullscreen-preview -show filebrowser -filebrowser-command \"ya emit reveal\" -filebrowser-directory \"$(pwd)\"", desc = "Grid view" },
|
[[mgr.prepend_keymap]]
|
||||||
]
|
on = "<Tab>"
|
||||||
|
run = "plugin split-tabs spl_switch_tab"
|
||||||
|
desc = "Dual-pane: switch pane"
|
||||||
|
|
||||||
|
[[mgr.prepend_keymap]]
|
||||||
|
on = "P"
|
||||||
|
run = "plugin split-tabs spl_preview"
|
||||||
|
desc = "Dual-pane: toggle bottom preview"
|
||||||
|
|
||||||
|
[[mgr.prepend_keymap]]
|
||||||
|
on = "<C-g>"
|
||||||
|
run = "shell -- rofi -theme fullscreen-preview -show filebrowser -filebrowser-command \"ya emit reveal\" -filebrowser-directory \"$(pwd)\""
|
||||||
|
desc = "Grid view"
|
||||||
|
|
||||||
|
[[mgr.prepend_keymap]]
|
||||||
|
on = "K"
|
||||||
|
run = "plugin parent-arrow -1"
|
||||||
|
|
||||||
|
[[mgr.prepend_keymap]]
|
||||||
|
on = "J"
|
||||||
|
run = "plugin parent-arrow 1"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
--- @sync entry
|
||||||
|
local function entry(_, job)
|
||||||
|
local parent = cx.active.parent
|
||||||
|
if not parent then return end
|
||||||
|
|
||||||
|
local target = parent.files[parent.cursor + 1 + job.args[1]]
|
||||||
|
if target and target.cha.is_dir then
|
||||||
|
ya.emit("cd", { target.url })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return { entry = entry }
|
||||||
Reference in new issue
Block a user