From fff6a726d845a7a0f1069bfe12afadf91a956ba7 Mon Sep 17 00:00:00 2001 From: Uyanide Date: Sun, 26 Apr 2026 18:42:59 +0200 Subject: [PATCH] yazi: update keybinds --- config/shell/.config/zsh/conf.d/60-alias.zsh | 17 +- config/yazi/.config/yazi/keymap.toml | 916 +++++++++---------- 2 files changed, 468 insertions(+), 465 deletions(-) diff --git a/config/shell/.config/zsh/conf.d/60-alias.zsh b/config/shell/.config/zsh/conf.d/60-alias.zsh index 58ced50..c5c290b 100644 --- a/config/shell/.config/zsh/conf.d/60-alias.zsh +++ b/config/shell/.config/zsh/conf.d/60-alias.zsh @@ -180,17 +180,20 @@ if (( $+commands[git] )); then print -r -- "$repo" } - gc() { - local repo - repo=$(uy_git_repo_from_clipboard) || return 1 - git clone "$repo" - } + # gc() { + # local repo + # repo=$(uy_git_repo_from_clipboard) || return 1 + # git clone "$repo" + # } pingo() { - cd "$HOME/Repositories/Uni" || return 1 + builtin cd "$HOME/Repositories/Uni" || return 1 local repo repo=$(uy_git_repo_from_clipboard) || return 1 local dir_name="${repo:t:r}" + local course="${${dir_name%%[^[:lower:]]*}:u}" + mkdir -p "$course" + builtin cd "$course" || return 1 if [[ ! -d "$dir_name" ]]; then git clone "$repo" || return 1 fi @@ -201,7 +204,7 @@ if (( $+commands[git] )); then disown else echo "Opening method missing or invalid" - cd "$dir_name" + builtin cd "$dir_name" fi } fi diff --git a/config/yazi/.config/yazi/keymap.toml b/config/yazi/.config/yazi/keymap.toml index a836168..511c173 100755 --- a/config/yazi/.config/yazi/keymap.toml +++ b/config/yazi/.config/yazi/keymap.toml @@ -4,545 +4,545 @@ [mgr] prepend_keymap = [ - { on = "l", run = 'plugin smart-enter' }, - { on = "", 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 = [ - "P", - ], run = "spot", desc = "Open spotter" }, - { on = [ - "c", - "a", - ], run = "plugin compress", desc = "Archive selected files" }, + { on = "l", run = 'plugin smart-enter' }, + { on = "", 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 = [ + "P", + ], run = "spot", desc = "Open spotter" }, + { on = [ + "c", + "a", + ], run = "plugin compress", desc = "Archive selected files" }, ] keymap = [ - { on = "", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, - { on = "", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, - #{ on = "q", run = "quit", desc = "Exit the process" }, - { on = "q", run = "close", desc = "Close the current tab, or quit if it is last tab" }, - { on = "Q", run = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" }, - { on = "", run = "suspend", desc = "Suspend the process" }, + { on = "", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, + { on = "", run = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, + #{ on = "q", run = "quit", desc = "Exit the process" }, + { on = "q", run = "close", desc = "Close the current tab, or quit if it is last tab" }, + { on = "Q", run = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" }, + { on = "", run = "suspend", desc = "Suspend the process" }, - { on = "R", run = "reload", desc = "Refresh the current directory" }, + { on = "R", run = "reload", desc = "Refresh the current directory" }, - # Hopping - { on = "k", run = "arrow -1", desc = "Move cursor up" }, - { on = "j", run = "arrow 1", desc = "Move cursor down" }, + # Hopping + { on = "k", run = "arrow -1", desc = "Move cursor up" }, + { on = "j", run = "arrow 1", desc = "Move cursor down" }, - { on = "", run = "arrow -1", desc = "Move cursor up" }, - { on = "", run = "arrow 1", desc = "Move cursor down" }, + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, - { on = "", run = "arrow -50%", desc = "Move cursor up half page" }, - { on = "", run = "arrow 50%", desc = "Move cursor down half page" }, + { on = "", run = "arrow -50%", desc = "Move cursor up half page" }, + { on = "", run = "arrow 50%", desc = "Move cursor down half page" }, - { on = "K", run = "arrow -5", desc = "Move cursor up 5 rows" }, - { on = "J", run = "arrow 5", desc = "Move cursor down 5 rows" }, + { on = "K", run = "arrow -5", desc = "Move cursor up 5 rows" }, + { on = "J", run = "arrow 5", desc = "Move cursor down 5 rows" }, - { on = "", run = "arrow -50%", desc = "Move cursor up half page" }, - { on = "", run = "arrow 50%", desc = "Move cursor down half page" }, - { on = "", run = "arrow -100%", desc = "Move cursor up one page" }, - { on = "", run = "arrow 100%", desc = "Move cursor down one page" }, + { on = "", run = "arrow -50%", desc = "Move cursor up half page" }, + { on = "", run = "arrow 50%", desc = "Move cursor down half page" }, + { on = "", run = "arrow -100%", desc = "Move cursor up one page" }, + { on = "", run = "arrow 100%", desc = "Move cursor down one page" }, - { on = [ - "g", - "g", - ], run = "arrow bot", desc = "Move cursor to the top" }, - { on = "G", run = "arrow top", desc = "Move cursor to the bottom" }, + { on = [ + "g", + "g", + ], run = "arrow bot", desc = "Move cursor to the top" }, + { on = "G", run = "arrow top", desc = "Move cursor to the bottom" }, - # Navigation - { on = "h", run = "leave", desc = "Go back to the parent directory" }, + # Navigation + { on = "h", run = "leave", desc = "Go back to the parent directory" }, - { on = "", run = "leave", desc = "Go back to the parent directory" }, - { on = "", run = "enter", desc = "Enter the child directory" }, + { on = "", run = "leave", desc = "Go back to the parent directory" }, + { on = "", run = "enter", desc = "Enter the child directory" }, - { on = "N", run = "back", desc = "Go back to the previous directory" }, - { on = "I", run = "forward", desc = "Go forward to the next directory" }, + { on = "N", run = "back", desc = "Go back to the previous directory" }, + { on = "I", run = "forward", desc = "Go forward to the next directory" }, - # Selection - { on = "", 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 = "", run = "select_all --state=true", desc = "Select all files" }, - # { on = "", run = "select_all --state=none", desc = "Inverse selection of all files" }, + # Selection + { on = "", 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 = "", run = "toggle_all --state=true", desc = "Select all files" }, + { on = "", run = "toggle_all", desc = "Inverse selection of all files" }, - # Find - { on = "", 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 = "f", run = "search fd", desc = "Search files by name using fd" }, - { on = "F", run = "search rg", desc = "Search files by content using ripgrep" }, - { on = "", run = "escape --search", desc = "Cancel the ongoing search" }, - { on = "f", run = "filter --smart", desc = "Filter files" }, - { on = "/", run = "find --smart", desc = "Find next file" }, - { on = "?", run = "find --previous --smart", desc = "Find previous file" }, - { on = "n", run = "find_arrow", desc = "Go to the next found" }, - { on = "N", run = "find_arrow --previous", desc = "Go to the previous found" }, + # Find + { on = "", 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 = "f", run = "search fd", desc = "Search files by name using fd" }, + { on = "F", run = "search rg", desc = "Search files by content using ripgrep" }, + { on = "", run = "escape --search", desc = "Cancel the ongoing search" }, + { on = "f", run = "filter --smart", desc = "Filter files" }, + { on = "/", run = "find --smart", desc = "Find next file" }, + { on = "?", run = "find --previous --smart", desc = "Find previous file" }, + { on = "n", run = "find_arrow", desc = "Go to the next found" }, + { on = "N", run = "find_arrow --previous", desc = "Go to the previous found" }, - # Shell - { on = "", run = "shell --confirm --block lazygit", desc = "Lazygit" }, - { on = ";", run = "shell --interactive", desc = "Run a shell command" }, - { on = ":", run = "shell --block --interactive", desc = "Run a shell command (block until finishes)" }, + # Shell + { on = "", run = "shell --confirm --block lazygit", desc = "Lazygit" }, + { on = ";", run = "shell --interactive", desc = "Run a shell command" }, + { on = ":", run = "shell --block --interactive", desc = "Run a shell command (block until finishes)" }, - # Hidden files - { on = ".", run = "hidden toggle", desc = "Toggle the visibility of hidden files" }, + # Hidden files + { on = ".", run = "hidden toggle", desc = "Toggle the visibility of hidden files" }, - # Open - { on = "L", run = "open --interactive", desc = "Open selected files interactively" }, + # Open + { on = "L", run = "open --interactive", desc = "Open selected files interactively" }, - # Create - { on = "T", run = "create", desc = "Create a file (ends with / for directories)" }, - { on = "M", run = "create --dir", desc = "Create a directory" }, + # Create + { on = "T", run = "create", desc = "Create a file (ends with / for directories)" }, + { on = "M", run = "create --dir", desc = "Create a directory" }, - # Rename - { 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)" }, + # Rename + { 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"], run = "remove", desc = "Trash selected files" }, - { on = [ - "d", - "D", - ], run = "remove --permanently", desc = "Permanently delete selected files" }, + # Operation: D + { 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" }, - # 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" }, + # 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" }, - # 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" }, + # 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" }, - # 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" }, + # 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" }, - # 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)" }, + # 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)" }, - # 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", - "", - ], run = "cd --interactive", desc = "Go to a directory interactively" }, + # 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", + "", + ], 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", ""], 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" }, - { on = "2", run = "tab_switch 1", desc = "Switch to the second tab" }, - { on = "3", run = "tab_switch 2", desc = "Switch to the third tab" }, - { on = "4", run = "tab_switch 3", desc = "Switch to the fourth tab" }, - { on = "5", run = "tab_switch 4", desc = "Switch to the fifth tab" }, - { on = "6", run = "tab_switch 5", desc = "Switch to the sixth tab" }, - { on = "7", run = "tab_switch 6", desc = "Switch to the seventh tab" }, - { on = "8", run = "tab_switch 7", desc = "Switch to the eighth tab" }, - { on = "9", run = "tab_switch 8", desc = "Switch to the ninth tab" }, + # 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", ""], 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" }, + { on = "2", run = "tab_switch 1", desc = "Switch to the second tab" }, + { on = "3", run = "tab_switch 2", desc = "Switch to the third tab" }, + { on = "4", run = "tab_switch 3", desc = "Switch to the fourth tab" }, + { on = "5", run = "tab_switch 4", desc = "Switch to the fifth tab" }, + { on = "6", run = "tab_switch 5", desc = "Switch to the sixth tab" }, + { on = "7", run = "tab_switch 6", desc = "Switch to the seventh tab" }, + { on = "8", run = "tab_switch 7", desc = "Switch to the eighth tab" }, + { on = "9", run = "tab_switch 8", desc = "Switch to the ninth tab" }, - # Tasks - { on = "w", run = "tasks_show", desc = "Show task manager" }, + # Tasks + { on = "w", run = "tasks_show", desc = "Show task manager" }, - # Help - { on = "~", run = "help", desc = "Open help" }, - { on = "", run = "help", desc = "Open help" }, + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, ] [spot] keymap = [ - # Navigation - { on = "u", run = "arrow -1", desc = "Move up" }, - { on = "", run = "arrow -1", desc = "Move up" }, - { on = "e", run = "arrow 1", desc = "Move down" }, - { on = "", run = "arrow 1", desc = "Move down" }, + # Navigation + { on = "k", run = "arrow -1", desc = "Move up" }, + { on = "", run = "arrow -1", desc = "Move up" }, + { on = "j", run = "arrow 1", desc = "Move down" }, + { on = "", run = "arrow 1", desc = "Move down" }, - # Close - { on = "", run = "close", desc = "Close spotter" }, - { on = "q", run = "close", desc = "Close spotter" }, + # Close + { on = "", run = "close", desc = "Close spotter" }, + { on = "q", run = "close", desc = "Close spotter" }, - # Swipe through files - { on = "", run = "swipe -5", desc = "Swipe 5 files up" }, - { on = "", run = "swipe 5", desc = "Swipe 5 files down" }, + # Swipe through files + { on = "", run = "swipe -5", desc = "Swipe 5 files up" }, + { on = "", run = "swipe 5", desc = "Swipe 5 files down" }, - # Copy content - { on = "y", run = "copy cell", desc = "Copy cell content" }, + # Copy content + { on = "y", run = "copy cell", desc = "Copy cell content" }, ] [tasks] keymap = [ - { on = "", run = "close", desc = "Close task manager" }, - { on = "", run = "close", desc = "Close task manager" }, - { on = "", run = "close", desc = "Close task manager" }, - { on = "w", run = "close", desc = "Close task manager" }, + { on = "", run = "close", desc = "Close task manager" }, + { on = "", run = "close", desc = "Close task manager" }, + { on = "", run = "close", desc = "Close task manager" }, + { on = "w", run = "close", desc = "Close task manager" }, - { on = "u", run = "arrow -1", desc = "Move cursor up" }, - { on = "e", run = "arrow 1", desc = "Move cursor down" }, + { on = "k", run = "arrow -1", desc = "Move cursor up" }, + { on = "j", run = "arrow 1", desc = "Move cursor down" }, - { on = "", run = "arrow -1", desc = "Move cursor up" }, - { on = "", run = "arrow 1", desc = "Move cursor down" }, + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, - { on = "", run = "inspect", desc = "Inspect the task" }, - { on = "x", run = "cancel", desc = "Cancel the task" }, + { on = "", run = "inspect", desc = "Inspect the task" }, + { on = "x", run = "cancel", desc = "Cancel the task" }, - # Help - { on = "~", run = "help", desc = "Open help" }, - { on = "", run = "help", desc = "Open help" }, + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, ] [pick] keymap = [ - { on = "", run = "close", desc = "Cancel selection" }, - { on = "", run = "close", desc = "Cancel selection" }, - { on = "", run = "close", desc = "Cancel selection" }, - { on = "", run = "close --submit", desc = "Submit the selection" }, + { on = "", run = "close", desc = "Cancel selection" }, + { on = "", run = "close", desc = "Cancel selection" }, + { on = "", run = "close", desc = "Cancel selection" }, + { on = "", run = "close --submit", desc = "Submit the selection" }, - { on = "u", run = "arrow -1", desc = "Move cursor up" }, - { on = "e", run = "arrow 1", desc = "Move cursor down" }, + { on = "k", run = "arrow -1", desc = "Move cursor up" }, + { on = "j", run = "arrow 1", desc = "Move cursor down" }, - { on = "", run = "arrow -1", desc = "Move cursor up" }, - { on = "", run = "arrow 1", desc = "Move cursor down" }, + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, - # Help - { on = "~", run = "help", desc = "Open help" }, - { on = "", run = "help", desc = "Open help" }, + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, ] [input] keymap = [ - { on = "", run = "close", desc = "Cancel input" }, - { on = "", run = "close --submit", desc = "Submit the input" }, - { on = "", run = "escape", desc = "Go back the normal mode, or cancel input" }, - { on = "", run = "escape", desc = "Go back the normal mode, or cancel input" }, + { on = "", run = "close", desc = "Cancel input" }, + { on = "", run = "close --submit", desc = "Submit the input" }, + { on = "", run = "escape", desc = "Go back the normal mode, or cancel input" }, + { on = "", run = "escape", desc = "Go back the normal mode, or cancel input" }, - # 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 = "v", run = "visual", desc = "Enter visual mode" }, - { on = "V", run = [ - "move -999", - "visual", - "move 999", - ], desc = "Enter visual mode and select all" }, + # 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 = "v", run = "visual", desc = "Enter visual mode" }, + { 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" }, - { on = "i", run = "move 1", desc = "Move forward a character" }, - { on = "", run = "move -1", desc = "Move back a character" }, - { on = "", run = "move 1", desc = "Move forward a character" }, - { on = "", run = "move -1", desc = "Move back a character" }, - { on = "", run = "move 1", desc = "Move forward a character" }, + # Character-wise movement + { on = "n", run = "move -1", desc = "Move back a character" }, + { on = "i", run = "move 1", desc = "Move forward a character" }, + { on = "", run = "move -1", desc = "Move back a character" }, + { on = "", run = "move 1", desc = "Move forward a character" }, + { on = "", run = "move -1", desc = "Move back a character" }, + { on = "", run = "move 1", desc = "Move forward a character" }, - # Word-wise movement - { on = "b", run = "backward", desc = "Move back to the start of the current or previous word" }, - { on = "w", run = "forward", desc = "Move forward to the start of the next word" }, - { on = "h", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, - { on = "", run = "backward", desc = "Move back to the start of the current or previous word" }, - { on = "", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, + # Word-wise movement + { on = "b", run = "backward", desc = "Move back to the start of the current or previous word" }, + { on = "w", run = "forward", desc = "Move forward to the start of the next word" }, + { on = "h", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, + { on = "", run = "backward", desc = "Move back to the start of the current or previous word" }, + { on = "", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, - # Line-wise movement - { on = "N", run = "move -999", desc = "Move to the BOL" }, - { on = "I", run = "move 999", desc = "Move to the EOL" }, - { on = "", run = "move -999", desc = "Move to the BOL" }, - { on = "", run = "move 999", desc = "Move to the EOL" }, - { on = "", run = "move -999", desc = "Move to the BOL" }, - { on = "", run = "move 999", desc = "Move to the EOL" }, + # Line-wise movement + { on = "N", run = "move -999", desc = "Move to the BOL" }, + { on = "I", run = "move 999", desc = "Move to the EOL" }, + { on = "", run = "move -999", desc = "Move to the BOL" }, + { on = "", run = "move 999", desc = "Move to the EOL" }, + { on = "", run = "move -999", desc = "Move to the BOL" }, + { on = "", run = "move 999", desc = "Move to the EOL" }, - # Delete - { on = "", run = "backspace", desc = "Delete the character before the cursor" }, - { on = "", run = "backspace --under", desc = "Delete the character under the cursor" }, - { on = "", run = "backspace", desc = "Delete the character before the cursor" }, - { on = "", run = "backspace --under", desc = "Delete the character under the cursor" }, + # Delete + { on = "", run = "backspace", desc = "Delete the character before the cursor" }, + { on = "", run = "backspace --under", desc = "Delete the character under the cursor" }, + { on = "", run = "backspace", desc = "Delete the character before the cursor" }, + { on = "", run = "backspace --under", desc = "Delete the character under the cursor" }, - # Kill - { on = "", run = "kill bol", desc = "Kill backwards to the BOL" }, - { on = "", run = "kill eol", desc = "Kill forwards to the EOL" }, - { on = "", run = "kill backward", desc = "Kill backwards to the start of the current word" }, - { on = "", run = "kill forward", desc = "Kill forwards to the end of the current word" }, + # Kill + { on = "", run = "kill bol", desc = "Kill backwards to the BOL" }, + { on = "", run = "kill eol", desc = "Kill forwards to the EOL" }, + { on = "", run = "kill backward", desc = "Kill backwards to the start of the current word" }, + { on = "", run = "kill forward", desc = "Kill forwards to the end of the current word" }, - # 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 = "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 = "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" }, + # 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 = "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 = "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" }, - # Undo/Redo - { on = "l", run = "undo", desc = "Undo the last operation" }, - { on = "", run = "redo", desc = "Redo the last operation" }, + # Undo/Redo + { on = "u", run = "undo", desc = "Undo the last operation" }, + { on = "U", run = "redo", desc = "Redo the last operation" }, - # Help - { on = "~", run = "help", desc = "Open help" }, - { on = "", run = "help", desc = "Open help" }, + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, ] -[completion] +[cmp] keymap = [ - { on = "", run = "close", desc = "Cancel completion" }, - { on = "", run = "close --submit", desc = "Submit the completion" }, - { on = "", run = [ - "close --submit", - "close_input --submit", - ], desc = "Submit the completion and input" }, + { on = "", run = "close", desc = "Cancel completion" }, + { on = "", run = "close --submit", desc = "Submit the completion" }, + { on = "", run = [ + "close --submit", + "close_input --submit", + ], desc = "Submit the completion and input" }, - { on = "", run = "arrow -1", desc = "Move cursor up" }, - { on = "", run = "arrow 1", desc = "Move cursor down" }, + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, - { on = "", run = "arrow -1", desc = "Move cursor up" }, - { on = "", run = "arrow 1", desc = "Move cursor down" }, + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, - # Help - { on = "~", run = "help", desc = "Open help" }, - { on = "", run = "help", desc = "Open help" }, + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, ] [help] keymap = [ - { on = "", run = "escape", desc = "Clear the filter, or hide the help" }, - { on = "", run = "escape", desc = "Clear the filter, or hide the help" }, - { on = "q", run = "close", desc = "Exit the process" }, - { on = "", run = "close", desc = "Hide the help" }, + { on = "", run = "escape", desc = "Clear the filter, or hide the help" }, + { on = "", run = "escape", desc = "Clear the filter, or hide the help" }, + { on = "q", run = "close", desc = "Exit the process" }, + { on = "", run = "close", desc = "Hide the help" }, - # Navigation - { on = "u", run = "arrow -1", desc = "Move cursor up" }, - { on = "e", run = "arrow 1", desc = "Move cursor down" }, + # Navigation + { on = "k", run = "arrow -1", desc = "Move cursor up" }, + { on = "j", run = "arrow 1", desc = "Move cursor down" }, - { on = "", run = "arrow -1", desc = "Move cursor up" }, - { on = "", run = "arrow 1", desc = "Move cursor down" }, + { on = "", run = "arrow -1", desc = "Move cursor up" }, + { on = "", run = "arrow 1", desc = "Move cursor down" }, - # Filtering - { on = "f", run = "filter", desc = "Apply a filter for the help items" }, + # Filtering + { on = "f", run = "filter", desc = "Apply a filter for the help items" }, ]