yazi: update

This commit is contained in:
2025-10-08 21:59:30 +02:00
parent fcb4dfb530
commit e1a02f7994
16 changed files with 982 additions and 1143 deletions

View File

@@ -8,15 +8,15 @@ prepend_keymap = [
{ on = "<Enter>", run = 'plugin smart-enter' },
{ on = "S", run = 'shell "$SHELL" --block --confirm' },
{ on = [
"'",
"#",
"a",
], run = "plugin yamb save", desc = "Add bookmark" },
{ on = [
"'",
"'",
"#",
"#",
], run = "plugin yamb jump_by_fzf", desc = "Jump bookmark by fzf" },
{ on = [
"'",
"#",
"r",
], run = "plugin yamb delete_by_key", desc = "Delete bookmark by key" },
{ on = [
@@ -56,7 +56,10 @@ keymap = [
{ on = "<PageUp>", run = "arrow -100%", desc = "Move cursor up one page" },
{ on = "<PageDown>", run = "arrow 100%", desc = "Move cursor down one page" },
{ on = ["g", "g"], run = "arrow bot", desc = "Move cursor to the top" },
{ on = [
"g",
"g",
], run = "arrow bot", desc = "Move cursor to the top" },
{ on = "G", run = "arrow top", desc = "Move cursor to the bottom" },
# Navigation
@@ -69,7 +72,10 @@ keymap = [
{ on = "I", run = "forward", desc = "Go forward to the next directory" },
# Selection
{ on = "<Space>", run = ["toggle", "arrow 1"], desc = "Toggle the current selection state" },
{ on = "<Space>", run = [
"toggle",
"arrow 1",
], desc = "Toggle the current selection state" },
{ on = "v", run = "toggle_all", desc = "Enter visual mode (selection mode)" },
{ on = "V", run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" },
# { on = "<C-a>", run = "select_all --state=true", desc = "Select all files" },
@@ -77,7 +83,10 @@ keymap = [
# Find
{ on = "<C-p>", run = "plugin fzf", desc = "Jump to a directory or reveal a file using fzf" },
{ on = ["z", "o"], run = "plugin zoxide", desc = "Jump to a directory using zoxide" },
{ on = [
"z",
"o",
], run = "plugin zoxide", desc = "Jump to a directory using zoxide" },
# { on = "f", run = "search fd", desc = "Search files by name using fd" },
{ on = "F", run = "search rg", desc = "Search files by content using ripgrep" },
{ on = "<C-s>", run = "escape --search", desc = "Cancel the ongoing search" },
@@ -103,71 +112,231 @@ keymap = [
{ on = "M", run = "create --dir", desc = "Create a directory" },
# Rename
{ on = ["c", "w"], run = "rename --empty=all", desc = "Rename selected file(s)" },
{ on = [
"c",
"w",
], run = "rename --empty=all", desc = "Rename selected file(s)" },
{ on = "k", run = "rename --cursor=start", desc = "Rename selected file(s)" },
{ on = "a", run = "rename --cursor=before_ext", desc = "Rename selected file(s)" },
{ on = "A", run = "rename --cursor=end", desc = "Rename selected file(s)" },
# Operation: D
{ on = ["d", "d"], run = "yank --cut", desc = "Yank selected files (cut)" },
{ on = [
"d",
"d",
], run = "yank --cut", desc = "Yank selected files (cut)" },
# { on = ["d"], run = "remove", desc = "Trash selected files" },
{ on = ["d", "D"], run = "remove --permanently", desc = "Permanently delete selected files" },
{ on = [
"d",
"D",
], run = "remove --permanently", desc = "Permanently delete selected files" },
# Operation: Y
{ on = ["y", "y"], run = "yank", desc = "Yank selected files (copy)" },
{ on = ["y", "p"], run = "copy path", desc = "Copy the file path" },
{ on = ["y", "d"], run = "copy dirname", desc = "Copy the directory path" },
{ on = ["y", "f"], run = "copy filename", desc = "Copy the filename" },
{ on = ["y", "n"], run = "copy name_without_ext", desc = "Copy the filename without extension" },
{ on = ["y", "c"], run = "unyank", desc = "Cancel the yank status" },
{ on = [
"y",
"y",
], run = "yank", desc = "Yank selected files (copy)" },
{ on = [
"y",
"p",
], run = "copy path", desc = "Copy the file path" },
{ on = [
"y",
"d",
], run = "copy dirname", desc = "Copy the directory path" },
{ on = [
"y",
"f",
], run = "copy filename", desc = "Copy the filename" },
{ on = [
"y",
"n",
], run = "copy name_without_ext", desc = "Copy the filename without extension" },
{ on = [
"y",
"c",
], run = "unyank", desc = "Cancel the yank status" },
# Operation: P
{ on = ["p", "p"], run = "paste", desc = "Paste yanked files" },
{ on = ["p", "P"], run = "paste --force", desc = "Paste yanked files (overwrite if the destination exists)" },
{ on = ["p", "l"], run = "link", desc = "Symlink the absolute path of yanked files" },
{ on = ["p", "L"], run = "link --relative", desc = "Symlink the relative path of yanked files" },
{ on = ["p", "h"], run = "hardlink", desc = "Hardlink yanked files" },
{ on = [
"p",
"p",
], run = "paste", desc = "Paste yanked files" },
{ on = [
"p",
"P",
], run = "paste --force", desc = "Paste yanked files (overwrite if the destination exists)" },
{ on = [
"p",
"l",
], run = "link", desc = "Symlink the absolute path of yanked files" },
{ on = [
"p",
"L",
], run = "link --relative", desc = "Symlink the relative path of yanked files" },
{ on = [
"p",
"h",
], run = "hardlink", desc = "Hardlink yanked files" },
# Linemode
{ on = ["m", "s"], run = "linemode size", desc = "Set linemode to size" },
{ on = ["m", "p"], run = "linemode perm", desc = "Set linemode to permissions" },
{ on = ["m", "c"], run = "linemode btime", desc = "Set linemode to btime" },
{ on = ["m", "m"], run = "linemode mtime", desc = "Set linemode to mtime" },
{ on = ["m", "o"], run = "linemode owner", desc = "Set linemode to owner" },
{ on = ["m", "n"], run = "linemode none", desc = "Set linemode to none" },
{ on = [
"m",
"s",
], run = "linemode size", desc = "Set linemode to size" },
{ on = [
"m",
"p",
], run = "linemode perm", desc = "Set linemode to permissions" },
{ on = [
"m",
"c",
], run = "linemode btime", desc = "Set linemode to btime" },
{ on = [
"m",
"m",
], run = "linemode mtime", desc = "Set linemode to mtime" },
{ on = [
"m",
"o",
], run = "linemode owner", desc = "Set linemode to owner" },
{ on = [
"m",
"n",
], run = "linemode none", desc = "Set linemode to none" },
# Sorting
{ on = ["o", "M"], run = ["sort mtime --reverse=no", "linemode mtime"], desc = "Sort by modified time" },
{ on = ["o", "m"], run = ["sort mtime --reverse", "linemode mtime"], desc = "Sort by modified time (reverse)" },
{ on = ["o", "C"], run = ["sort btime --reverse=no", "linemode btime"], desc = "Sort by created time" },
{ on = ["o", "c"], run = ["sort btime --reverse", "linemode btime"], desc = "Sort by created time (reverse)" },
{ on = ["o", "E"], run = "sort extension --reverse=no", desc = "Sort by extension" },
{ on = ["o", "e"], run = "sort extension --reverse", desc = "Sort by extension (reverse)" },
{ on = ["o", "a"], run = "sort alphabetical --reverse=no", desc = "Sort alphabetically" },
{ on = ["o", "A"], run = "sort alphabetical --reverse", desc = "Sort alphabetically (reverse)" },
{ on = ["o", "n"], run = "sort natural --reverse=no", desc = "Sort naturally" },
{ on = ["o", "N"], run = "sort natural --reverse", desc = "Sort naturally (reverse)" },
{ on = ["o", "s"], run = ["sort size --reverse=no", "linemode size"], desc = "Sort by size" },
{ on = ["o", "S"], run = ["sort size --reverse", "linemode size"], desc = "Sort by size (reverse)" },
{ on = [
"o",
"M",
], run = [
"sort mtime --reverse=no",
"linemode mtime",
], desc = "Sort by modified time" },
{ on = [
"o",
"m",
], run = [
"sort mtime --reverse",
"linemode mtime",
], desc = "Sort by modified time (reverse)" },
{ on = [
"o",
"C",
], run = [
"sort btime --reverse=no",
"linemode btime",
], desc = "Sort by created time" },
{ on = [
"o",
"c",
], run = [
"sort btime --reverse",
"linemode btime",
], desc = "Sort by created time (reverse)" },
{ on = [
"o",
"E",
], run = "sort extension --reverse=no", desc = "Sort by extension" },
{ on = [
"o",
"e",
], run = "sort extension --reverse", desc = "Sort by extension (reverse)" },
{ on = [
"o",
"a",
], run = "sort alphabetical --reverse=no", desc = "Sort alphabetically" },
{ on = [
"o",
"A",
], run = "sort alphabetical --reverse", desc = "Sort alphabetically (reverse)" },
{ on = [
"o",
"n",
], run = "sort natural --reverse=no", desc = "Sort naturally" },
{ on = [
"o",
"N",
], run = "sort natural --reverse", desc = "Sort naturally (reverse)" },
{ on = [
"o",
"s",
], run = [
"sort size --reverse=no",
"linemode size",
], desc = "Sort by size" },
{ on = [
"o",
"S",
], run = [
"sort size --reverse",
"linemode size",
], desc = "Sort by size (reverse)" },
# Goto
{ on = ["g", "r"], run = "cd /", desc = "Go to the root directory" },
{ on = ["g", "h"], run = "cd ~", desc = "Go to the home directory" },
{ on = ["g", "c"], run = "cd ~/.config", desc = "Go to the config directory" },
{ on = ["g", "d"], run = "cd ~/Downloads", desc = "Go to the downloads directory" },
{ on = ["g", "D"], run = "cd ~/Desktop", desc = "Go to the desktop directory" },
{ on = ["g", "i"], run = "cd ~/Github", desc = "Go to the Github directory" },
{ on = ["g", "f", "f"], run = "cd ~/.config" },
{ on = ["g", "f", "n"], run = "cd ~/.config/nvim" },
{ on = ["g", "f", "y"], run = "cd ~/.config/yazi" },
{ on = ["g", "f", "l"], run = "cd ~/.config/jesseduffield/lazygit" },
{ on = ["g", "<Space>"], run = "cd --interactive", desc = "Go to a directory interactively" },
{ on = [
"g",
"r",
], run = "cd /", desc = "Go to the root directory" },
{ on = [
"g",
"h",
], run = "cd ~", desc = "Go to the home directory" },
{ on = [
"g",
"c",
], run = "cd ~/.config", desc = "Go to the config directory" },
{ on = [
"g",
"d",
], run = "cd ~/Downloads", desc = "Go to the downloads directory" },
{ on = [
"g",
"D",
], run = "cd ~/Desktop", desc = "Go to the desktop directory" },
{ on = [
"g",
"i",
], run = "cd ~/Github", desc = "Go to the Github directory" },
{ on = [
"g",
"f",
"f",
], run = "cd ~/.config" },
{ on = [
"g",
"f",
"n",
], run = "cd ~/.config/nvim" },
{ on = [
"g",
"f",
"y",
], run = "cd ~/.config/yazi" },
{ on = [
"g",
"f",
"l",
], run = "cd ~/.config/jesseduffield/lazygit" },
{ on = [
"g",
"<Space>",
], run = "cd --interactive", desc = "Go to a directory interactively" },
# Tabs
{ on = ["t", "u"], run = "tab_create --current", desc = "Create a new tab with CWD" },
{ on = ["t", "n"], run = "tab_switch -1 --relative", desc = "Switch to the previous tab" },
{ on = ["t", "i"], run = "tab_switch 1 --relative", desc = "Switch to the next tab" },
{ on = [
"t",
"u",
], run = "tab_create --current", desc = "Create a new tab with CWD" },
{ on = [
"t",
"n",
], run = "tab_switch -1 --relative", desc = "Switch to the previous tab" },
{ on = [
"t",
"i",
], run = "tab_switch 1 --relative", desc = "Switch to the next tab" },
#{ on = ["t", ""], run = "tab_swap -1", desc = "Swap current tab with previous tab" },
#{ on = ["}"], run = "tab_swap 1", desc = "Swap current tab with next tab" },
{ on = "1", run = "tab_switch 0", desc = "Switch to the first tab" },
@@ -258,10 +427,20 @@ keymap = [
# Mode
{ on = "k", run = "insert", desc = "Enter insert mode" },
{ on = "a", run = "insert --append", desc = "Enter append mode" },
{ on = "K", run = ["move -999", "insert"], desc = "Move to the BOL, and enter insert mode" },
{ on = "A", run = ["move 999", "insert --append"], desc = "Move to the EOL, and enter append mode" },
{ on = "K", run = [
"move -999",
"insert",
], desc = "Move to the BOL, and enter insert mode" },
{ on = "A", run = [
"move 999",
"insert --append",
], desc = "Move to the EOL, and enter append mode" },
{ on = "v", run = "visual", desc = "Enter visual mode" },
{ on = "V", run = ["move -999", "visual", "move 999"], desc = "Enter visual mode and select all" },
{ on = "V", run = [
"move -999",
"visual",
"move 999",
], desc = "Enter visual mode and select all" },
# Character-wise movement
{ on = "n", run = "move -1", desc = "Move back a character" },
@@ -300,10 +479,19 @@ keymap = [
# Cut/Yank/Paste
{ on = "d", run = "delete --cut", desc = "Cut the selected characters" },
{ on = "D", run = ["delete --cut", "move 999"], desc = "Cut until the EOL" },
{ on = "D", run = [
"delete --cut",
"move 999",
], desc = "Cut until the EOL" },
{ on = "c", run = "delete --cut --insert", desc = "Cut the selected characters, and enter insert mode" },
{ on = "C", run = ["delete --cut --insert", "move 999"], desc = "Cut until the EOL, and enter insert mode" },
{ on = "x", run = ["delete --cut", "move 1 --in-operating"], desc = "Cut the current character" },
{ on = "C", run = [
"delete --cut --insert",
"move 999",
], desc = "Cut until the EOL, and enter insert mode" },
{ on = "x", run = [
"delete --cut",
"move 1 --in-operating",
], desc = "Cut the current character" },
{ on = "y", run = "yank", desc = "Copy the selected characters" },
{ on = "p", run = "paste", desc = "Paste the copied characters after the cursor" },
{ on = "P", run = "paste --before", desc = "Paste the copied characters before the cursor" },
@@ -322,7 +510,10 @@ keymap = [
keymap = [
{ on = "<C-c>", run = "close", desc = "Cancel completion" },
{ on = "<Tab>", run = "close --submit", desc = "Submit the completion" },
{ on = "<Enter>", run = ["close --submit", "close_input --submit"], desc = "Submit the completion and input" },
{ on = "<Enter>", run = [
"close --submit",
"close_input --submit",
], desc = "Submit the completion and input" },
{ on = "<Up>", run = "arrow -1", desc = "Move cursor up" },
{ on = "<Down>", run = "arrow 1", desc = "Move cursor down" },