{lib, ...}: lib.fix (self: let fromInsert = key: self.insert."${key}".cmd; in { "operator" = { "escape" = { cmd = "fish_vi_operator_cancel"; sets_mode_to = "default"; }; "F" = { cmd = ""; sets_mode_to = "F"; }; "d" = { cmd = "fish_vi_exec_motion --linewise"; sets_mode_to = "default"; }; "e" = { cmd = "fish_vi_exec_motion forward-word-end"; sets_mode_to = "default"; }; "j" = { cmd = "fish_vi_exec_motion down-line"; sets_mode_to = "default"; }; "k" = { cmd = "fish_vi_exec_motion up-line"; sets_mode_to = "default"; }; "7" = { cmd = "fish_vi_arg_digit 7"; sets_mode_to = "default"; }; "h" = { cmd = "fish_vi_exec_motion backward-char"; sets_mode_to = "default"; }; "B" = { cmd = "fish_vi_exec_motion backward-bigword"; sets_mode_to = "default"; }; "9" = { cmd = "fish_vi_arg_digit 9"; sets_mode_to = "default"; }; "5" = { cmd = "fish_vi_arg_digit 5"; sets_mode_to = "default"; }; "E" = { cmd = "fish_vi_exec_motion forward-bigword-end"; sets_mode_to = "default"; }; "~" = { cmd = "fish_vi_exec_motion --linewise"; sets_mode_to = "default"; }; "4" = { cmd = "fish_vi_arg_digit 4"; sets_mode_to = "default"; }; "comma" = { cmd = "fish_vi_exec_motion repeat-jump-reverse"; sets_mode_to = "default"; }; "^" = { cmd = "fish_vi_exec_motion beginning-of-line"; sets_mode_to = "default"; }; "ctrl-[" = { cmd = "fish_vi_operator_cancel"; sets_mode_to = "default"; }; ";" = { cmd = "fish_vi_exec_motion repeat-jump"; sets_mode_to = "default"; }; "c" = { cmd = "fish_vi_exec_motion --linewise"; sets_mode_to = "default"; }; "T" = { cmd = ""; sets_mode_to = "T"; }; "t" = { cmd = ""; sets_mode_to = "t"; }; "2" = { cmd = "fish_vi_arg_digit 2"; sets_mode_to = "default"; }; "W" = { cmd = "fish_vi_exec_motion forward-bigword-vi"; sets_mode_to = "default"; }; "$" = { cmd = "fish_vi_exec_motion end-of-line"; sets_mode_to = "default"; }; "0" = { cmd = "fish_vi_exec_motion beginning-of-line"; sets_mode_to = "default"; }; "8" = { cmd = "fish_vi_arg_digit 8"; sets_mode_to = "default"; }; "g" = { "E" = { cmd = "fish_vi_exec_motion backward-bigword-end"; sets_mode_to = "default"; }; "e" = { cmd = "fish_vi_exec_motion backward-word-end"; sets_mode_to = "default"; }; }; "w" = { cmd = "fish_vi_exec_motion forward-word-vi"; sets_mode_to = "default"; }; "b" = { cmd = "fish_vi_exec_motion backward-word"; sets_mode_to = "default"; }; "6" = { cmd = "fish_vi_arg_digit 6"; sets_mode_to = "default"; }; "y" = { cmd = "fish_vi_exec_motion --linewise"; sets_mode_to = "default"; }; "l" = { cmd = "fish_vi_exec_motion forward-char"; sets_mode_to = "default"; }; "1" = { cmd = "fish_vi_arg_digit 1"; sets_mode_to = "default"; }; "f" = { cmd = ""; sets_mode_to = "f"; }; "3" = { cmd = "fish_vi_arg_digit 3"; sets_mode_to = "default"; }; }; "T" = { "" = { cmd = "get-key fish_vi_exec_motion commandline --backward-jump-till=$fish_key set -eg fish_key"; sets_mode_to = "default"; }; }; "f" = { "" = { cmd = "get-key fish_vi_exec_motion commandline --forward-jump=$fish_key set -eg fish_key"; sets_mode_to = "default"; }; }; "insert" = { "alt-up" = { cmd = "history-token-search-backward"; sets_mode_to = "default"; }; "alt-v" = { cmd = "edit_command_buffer"; sets_mode_to = "default"; }; "pageup" = { cmd = "beginning-of-history"; sets_mode_to = "default"; }; ">" = { cmd = "self-insert expand-abbr"; sets_mode_to = "default"; }; "left" = { cmd = "backward-char"; sets_mode_to = "default"; }; "\\e\\[1\\;9C" = { cmd = "nextd-or-forward-word"; sets_mode_to = "default"; }; "ctrl-k" = { cmd = "kill-line"; sets_mode_to = "default"; }; "&" = { cmd = "self-insert expand-abbr"; sets_mode_to = "default"; }; "shift-delete" = { cmd = "history-delete or backward-delete-char"; sets_mode_to = "default"; }; "alt-l" = { cmd = "__fish_list_current_token"; sets_mode_to = "default"; }; "shift-tab" = { cmd = "complete-and-search"; sets_mode_to = "default"; }; "space" = { cmd = "self-insert expand-abbr"; sets_mode_to = "default"; }; "up" = { cmd = "up-or-search"; sets_mode_to = "default"; }; "alt-#" = { cmd = "__fish_toggle_comment_commandline"; sets_mode_to = "default"; }; "tab" = { cmd = "complete"; sets_mode_to = "default"; }; "alt-h" = { cmd = "__fish_man_page"; sets_mode_to = "default"; }; "\\e\\[1\;9A" = { cmd = "history-token-search-backward"; sets_mode_to = "default"; }; "ctrl-u" = { cmd = "backward-kill-line"; sets_mode_to = "default"; }; "shift-backspace" = { cmd = "backward-delete-char"; sets_mode_to = "default"; }; "alt-enter" = { cmd = "commandline -i \\n (commandline --search-field >/dev/null && echo --search-field) expand-abbr"; sets_mode_to = "default"; }; "ctrl-w" = { cmd = "backward-kill-path-component"; sets_mode_to = "default"; }; "ctrl-right" = { cmd = "forward-token"; sets_mode_to = "default"; }; "pagedown" = { cmd = "end-of-history"; sets_mode_to = "default"; }; "alt-down" = { cmd = "history-token-search-forward"; sets_mode_to = "default"; }; "down" = { cmd = "down-or-search"; sets_mode_to = "default"; }; "ctrl-n" = { cmd = "accept-autosuggestion"; sets_mode_to = "default"; }; "enter" = { cmd = "execute"; sets_mode_to = "default"; }; "ctrl-m" = { cmd = "execute"; sets_mode_to = "default"; }; "shift-space" = { cmd = '' commandline -i " " (commandline --search-field >/dev/null && echo --search-field) expand-abbr ''; sets_mode_to = "default"; }; "ctrl-s" = { cmd = "pager-toggle-search"; sets_mode_to = "default"; }; "ctrl-i" = { cmd = "complete"; sets_mode_to = "default"; }; "shift-right" = { cmd = "forward-bigword"; sets_mode_to = "default"; }; "end" = { cmd = "end-of-line"; sets_mode_to = "default"; }; ")" = { cmd = "self-insert expand-abbr"; sets_mode_to = "default"; }; "ctrl-x" = { cmd = "fish_clipboard_copy"; sets_mode_to = "default"; }; "\\e\\[1\;9D" = { cmd = "prevd-or-backward-word"; sets_mode_to = "default"; }; "alt-e" = { cmd = "edit_command_buffer"; sets_mode_to = "default"; }; "alt-p" = { cmd = "__fish_paginate"; sets_mode_to = "default"; }; "f1" = { cmd = "__fish_man_page"; sets_mode_to = "default"; }; "shift-left" = { cmd = "backward-bigword"; sets_mode_to = "default"; }; "ctrl-l" = { cmd = "status test-terminal-feature scroll-content-up && commandline -f scrollback-push clear-screen"; sets_mode_to = "default"; }; "alt-y" = { cmd = "yank-pop"; sets_mode_to = "default"; }; "<" = { cmd = "self-insert expand-abbr"; sets_mode_to = "default"; }; "alt-w" = { cmd = "__fish_whatis_current_token"; sets_mode_to = "default"; }; "right" = { cmd = "forward-char"; sets_mode_to = "default"; }; "shift-enter" = { cmd = "commandline -i \\n (commandline --search-field >/dev/null && echo --search-field) expand-abbr"; sets_mode_to = "default"; }; "\\e\\[1\;9B" = { cmd = "history-token-search-forward"; sets_mode_to = "default"; }; "escape" = { cmd = '' if commandline -P commandline -f cancel else set fish_bind_mode default if test \(count \(commandline --cut-at-cursor \| tail -c2\)\) != 2 commandline -f backward-char end commandline -f repaint-mode end ''; sets_mode_to = "default"; }; "ctrl-\\[" = { cmd = '' if commandline -P commandline -f cancel else set fish_bind_mode default if test \(count \(commandline --cut-at-cursor \| tail -c2\)\) != 2 commandline -f backward-char end commandline -f repaint-mode end ''; }; "|" = { cmd = "self-insert expand-abbr"; sets_mode_to = "default"; }; "alt-b" = { cmd = "prevd-or-backward-word"; sets_mode_to = "default"; }; "ctrl-enter" = { cmd = "execute"; sets_mode_to = "default"; }; "alt-f" = { cmd = "nextd-or-forward-word"; sets_mode_to = "default"; }; "alt-s" = { cmd = '' for cmd in sudo doas please run0; if command -q $cmd; fish_commandline_prepend $cmd; break; end; end ''; sets_mode_to = "default"; }; "ctrl-space" = { cmd = '' test -n "$(commandline)" && commandline -i " " (commandline --search-field >/dev/null && echo --search-field) ''; sets_mode_to = "default"; }; "ctrl-left" = { cmd = "backward-token"; sets_mode_to = "default"; }; "ctrl-y" = { cmd = "yank"; sets_mode_to = "default"; }; "alt-." = { cmd = "history-token-search-backward"; sets_mode_to = "default"; }; "ctrl-j" = { cmd = "execute"; sets_mode_to = "default"; }; "alt-left" = { cmd = "prevd-or-backward-word"; sets_mode_to = "default"; }; "ctrl-h" = { cmd = "backward-delete-char"; sets_mode_to = "default"; }; "alt-o" = { cmd = "__fish_preview_current_file"; sets_mode_to = "default"; }; "delete" = { cmd = "delete-char"; sets_mode_to = "default"; }; "" = { cmd = "self-insert"; sets_mode_to = "default"; }; "ctrl-d" = { cmd = "delete-or-exit"; sets_mode_to = "default"; }; "alt-d" = { cmd = '' if test "$(commandline; printf .)" = "\n."; __fish_echo dirh; else; commandline -f kill-word; end ''; sets_mode_to = "default"; }; "alt-right" = { cmd = "nextd-or-forward-word"; sets_mode_to = "default"; }; "ctrl-v" = { cmd = "fish_clipboard_paste"; sets_mode_to = "default"; }; "home" = { cmd = "beginning-of-line"; sets_mode_to = "default"; }; ";" = { cmd = "self-insert expand-abbr"; sets_mode_to = "default"; }; "backspace" = { cmd = "backward-delete-char"; sets_mode_to = "default"; }; "ctrl-c" = { cmd = "clear-commandline"; sets_mode_to = "default"; }; }; "default" = { # "\\e\\[1\;9A" = {cmd = "history-token-search-backward";}; # "\\e\\[1\;9B" = {cmd = "history-token-search-forward";}; # "\\e\\[1\;9C" = {cmd = "nextd-or-forward-word";}; # "\\e\\[1\;9D" = {cmd = "prevd-or-backward-word";}; "down" = {cmd = "down-or-search";}; "ctrl-y" = {cmd = "yank";}; "ctrl-left" = {cmd = "backward-token";}; "alt-v" = {cmd = "edit_command_buffer";}; "ctrl-a" = {cmd = "fish_vi_inc";}; "ctrl-u" = {cmd = "backward-kill-line";}; "ctrl-x" = {cmd = "fish_vi_dec";}; "ctrl-r" = {cmd = "redo";}; "delete" = {cmd = fromInsert "delete";}; "alt-d" = {cmd = fromInsert "alt-d";}; "alt-l" = {cmd = fromInsert "alt-l";}; "alt-f" = {cmd = fromInsert "alt-f";}; "right" = {cmd = fromInsert "right";}; "alt-s" = {cmd = fromInsert "alt-s";}; "alt-w" = {cmd = fromInsert "alt-w";}; "ctrl-l" = {cmd = fromInsert "ctrl-l";}; "ctrl-v" = {cmd = fromInsert "ctrl-v";}; "ctrl-h" = {cmd = "backward-char";}; "backspace" = {cmd = "backward-char";}; "end" = {cmd = fromInsert "end";}; "alt-p" = {cmd = fromInsert "alt-p";}; "alt-up" = {cmd = fromInsert "alt-up";}; "ctrl-m" = { cmd = fromInsert "ctrl-m"; sets_mode_to = "insert"; }; "alt-h" = {cmd = fromInsert "alt-h";}; "alt-left" = {cmd = fromInsert "alt-left";}; "tab" = {cmd = fromInsert "tab";}; "ctrl-d" = {cmd = fromInsert "ctrl-d";}; "left" = {cmd = fromInsert "left";}; "pageup" = {cmd = fromInsert "pageup";}; "ctrl-w" = {cmd = fromInsert "ctrl-w";}; "alt-down" = {cmd = fromInsert "alt-down";}; "alt-b" = {cmd = fromInsert "alt-b";}; "alt-right" = {cmd = fromInsert "alt-right";}; "alt-y" = {cmd = fromInsert "alt-y";}; "ctrl-[" = {cmd = "set -g __fish_vi_count";}; "ctrl-i" = {cmd = fromInsert "ctrl-i";}; "home" = {cmd = fromInsert "home";}; "ctrl-s" = {cmd = fromInsert "ctrl-s";}; "shift-left" = {cmd = fromInsert "shift-left";}; "escape" = {cmd = "set -g __fish_vi_count";}; "alt-e" = {cmd = fromInsert "alt-e";}; "pagedown" = {cmd = fromInsert "pagedown";}; "shift-tab" = {cmd = fromInsert "shift-tab";}; "shift-delete" = {cmd = fromInsert "shift-delete";}; "shift-right" = {cmd = fromInsert "shift-right";}; "ctrl-k" = {cmd = fromInsert "ctrl-k";}; "alt-." = {cmd = "history-token-search-backward";}; "ctrl-right" = {cmd = "forward-token";}; "ctrl-c" = { cmd = "clear-commandline repaint-mode"; sets_mode_to = "insert"; }; "alt-o" = {cmd = "__fish_preview_current_file";}; "x" = {cmd = "__fish_vi_delete_char";}; "D" = {cmd = "kill-line";}; "j" = {cmd = "fish_vi_run_count down-or-search";}; "f" = {cmd = "forward-jump";}; "s" = { cmd = "delete-char repaint-mode"; sets_mode_to = "insert"; }; "%" = {cmd = "jump-to-matching-bracket";}; "k" = {cmd = "fish_vi_run_count up-or-search";}; ";" = {cmd = "repeat-jump";}; "P" = {cmd = "yank";}; ":" = { "q" = {cmd = "exit";}; }; "5" = {cmd = "fish_vi_arg_digit 5";}; "alt-#" = {cmd = "__fish_toggle_comment_commandline";}; "up" = {cmd = "up-or-search";}; "S" = { cmd = "kill-inner-line repaint-mode"; sets_mode_to = "insert"; }; "ctrl-j" = { cmd = "execute"; sets_mode_to = "insert"; }; "e" = {cmd = "fish_vi_run_count forward-word-end";}; "]" = {cmd = "history-token-search-forward";}; "b" = {cmd = "fish_vi_run_count backward-word";}; "r" = { cmd = "repaint-mode"; sets_mode_to = "replace_one"; }; "enter" = { cmd = "execute"; sets_mode_to = "insert"; }; "f1" = {cmd = fromInsert "f1";}; "\"" = { "+" = { "P" = {cmd = "fish_clipboard_paste";}; "y" = { "y" = {cmd = "fish_clipboard_copy";}; }; "p" = {cmd = "set -g fish_cursor_end_mode exclusive forward-char set -g fish_cursor_end_mode inclusive fish_clipboard_paste";}; "Y" = {cmd = "fish_clipboard_copy";}; }; "*" = { "p" = {cmd = "set -g fish_cursor_end_mode exclusive forward-char set -g fish_cursor_end_mode inclusive fish_clipboard_paste";}; "P" = {cmd = "fish_clipboard_paste";}; "Y" = {cmd = "fish_clipboard_copy";}; "y" = { "y" = {cmd = "fish_clipboard_copy";}; }; }; }; "t" = {cmd = "forward-jump-till";}; "~" = {cmd = "togglecase-char forward-single-char";}; "i" = { cmd = "repaint-mode"; sets_mode_to = "insert"; }; "9" = {cmd = "fish_vi_arg_digit 9";}; "4" = {cmd = "fish_vi_arg_digit 4";}; "l" = {cmd = "fish_vi_run_count forward-char";}; "T" = {cmd = "backward-jump-till";}; "/" = { cmd = "history-pager repaint-mode"; sets_mode_to = "insert"; }; "8" = {cmd = "fish_vi_arg_digit 8";}; "a" = { cmd = "set fish_cursor_end_mode exclusive forward-single-char repaint-mode"; sets_mode_to = "insert"; }; "R" = { cmd = "repaint-mode"; sets_mode_to = "replace"; }; "K" = {cmd = "man (commandline -t) 2>/dev/null; or echo -n \\a";}; "G" = {cmd = "end-of-buffer";}; "[" = {cmd = "history-token-search-backward";}; "o" = { cmd = "set fish_cursor_end_mode exclusive insert-line-under repaint-mode"; sets_mode_to = "insert"; }; "W" = {cmd = "fish_vi_run_count forward-bigword-vi";}; "w" = {cmd = "fish_vi_run_count forward-word-vi";}; "6" = {cmd = "fish_vi_arg_digit 6";}; "comma" = {cmd = "repeat-jump-reverse";}; "0" = { cmd = '' if test -n "$__fish_vi_count"; fish_vi_arg_digit 0; else; commandline -f beginning-of-line; end ''; }; "^" = {cmd = "beginning-of-line";}; "d" = { "$" = {cmd = "kill-line";}; "a" = { "w" = {cmd = "kill-a-word";}; "b" = {cmd = "jump-to-matching-bracket and jump-to-matching-bracket and begin-selection jump-to-matching-bracket kill-selection end-selection";}; "W" = {cmd = "kill-a-bigword";}; }; "i" = { "w" = {cmd = "kill-inner-word";}; "W" = {cmd = "kill-inner-bigword";}; "b" = {cmd = "jump-till-matching-bracket and jump-till-matching-bracket and begin-selection jump-till-matching-bracket kill-selection end-selection";}; }; "comma" = {cmd = "begin-selection repeat-jump-reverse kill-selection end-selection";}; ";" = {cmd = "begin-selection repeat-jump kill-selection end-selection";}; "0" = {cmd = "backward-kill-line";}; "^" = {cmd = "backward-kill-line";}; }; "1" = {cmd = "fish_vi_arg_digit 1";}; "F" = {cmd = "backward-jump";}; "Y" = {cmd = "kill-whole-line yank";}; "E" = {cmd = "fish_vi_run_count forward-bigword-end";}; "3" = {cmd = "fish_vi_arg_digit 3";}; "J" = {cmd = "end-of-line delete-char";}; "u" = {cmd = "undo";}; "c" = { "^" = { cmd = "backward-kill-line repaint-mode"; sets_mode_to = "insert"; }; "i" = { "w" = { cmd = "kill-inner-word repaint-mode"; sets_mode_to = "insert"; }; "W" = { cmd = "kill-inner-bigword repaint-mode"; sets_mode_to = "insert"; }; "b" = { cmd = "jump-till-matching-bracket and jump-till-matching-bracket and begin-selection jump-till-matching-bracket kill-selection end-selection"; sets_mode_to = "insert"; }; }; "a" = { "W" = { cmd = "kill-a-bigword repaint-mode"; sets_mode_to = "insert"; }; "w" = { cmd = "kill-a-word repaint-mode"; sets_mode_to = "insert"; }; "b" = { cmd = "jump-to-matching-bracket and jump-to-matching-bracket and begin-selection jump-to-matching-bracket kill-selection end-selection"; sets_mode_to = "insert"; }; }; "$" = { cmd = "kill-line repaint-mode"; sets_mode_to = "insert"; }; "0" = { cmd = "backward-kill-line repaint-mode"; sets_mode_to = "insert"; }; }; "_" = {cmd = "beginning-of-line";}; "A" = { cmd = "set fish_cursor_end_mode exclusive end-of-line repaint-mode"; sets_mode_to = "insert"; }; "I" = { cmd = "beginning-of-line repaint-mode"; sets_mode_to = "insert"; }; "$" = {cmd = "end-of-line";}; "X" = {cmd = "__fish_vi_backward_delete_char";}; "B" = {cmd = "fish_vi_run_count backward-bigword";}; "y" = { "0" = {cmd = "backward-kill-line yank";}; "i" = { "W" = {cmd = "kill-inner-bigword yank";}; "w" = {cmd = "kill-inner-word yank";}; "b" = {cmd = "jump-till-matching-bracket and jump-till-matching-bracket and begin-selection jump-till-matching-bracket fish_vi_yank_selection end-selection";}; }; "a" = { "W" = {cmd = "kill-a-bigword yank";}; "b" = {cmd = "jump-to-matching-bracket and jump-to-matching-bracket and begin-selection jump-to-matching-bracket fish_vi_yank_selection end-selection";}; "w" = {cmd = "kill-a-word yank";}; }; "^" = {cmd = "backward-kill-line yank";}; "$" = {cmd = "kill-line yank";}; }; "p" = {cmd = "set -g fish_cursor_end_mode exclusive forward-char set -g fish_cursor_end_mode inclusive yank";}; "#" = {cmd = "__fish_toggle_comment_commandline";}; "v" = { cmd = "begin-selection repaint-mode"; sets_mode_to = "visual"; }; "O" = { cmd = "set fish_cursor_end_mode exclusive insert-line-over repaint-mode"; sets_mode_to = "insert"; }; "2" = {cmd = "fish_vi_arg_digit 2";}; "g" = { "g" = {cmd = "beginning-of-buffer";}; "^" = {cmd = "beginning-of-line";}; "~" = {cmd = "fish_vi_start_operator swap-case";}; "u" = {cmd = "downcase-word";}; "U" = {cmd = "upcase-word";}; "$" = {cmd = "end-of-line";}; "E" = {cmd = "fish_vi_run_count backward-bigword-end";}; "p" = {cmd = "yank-pop";}; "e" = {cmd = "fish_vi_run_count backward-word-end";}; }; "7" = {cmd = "fish_vi_arg_digit 7";}; "C" = { cmd = "kill-line repaint-mode"; sets_mode_to = "insert"; }; "h" = {cmd = "fish_vi_run_count backward-char";}; }; "visual" = { "alt-down" = { cmd = "history-token-search-forward"; sets_mode_to = "default"; }; "ctrl-c" = { cmd = "end-selection repaint-mode"; sets_mode_to = "default"; }; "alt-h" = { cmd = "__fish_man_page"; sets_mode_to = "default"; }; "l" = { cmd = "forward-char"; sets_mode_to = "default"; }; "T" = { cmd = "backward-jump-till"; sets_mode_to = "default"; }; "e" = { cmd = "forward-word-end"; sets_mode_to = "default"; }; "right" = { cmd = "forward-char"; sets_mode_to = "default"; }; "t" = { cmd = "forward-jump-till"; sets_mode_to = "default"; }; "s" = { cmd = "kill-selection end-selection repaint-mode"; sets_mode_to = "insert"; }; "alt-#" = { cmd = "__fish_toggle_comment_commandline"; sets_mode_to = "default"; }; "_" = { cmd = "beginning-of-line"; sets_mode_to = "default"; }; "%" = { cmd = "jump-to-matching-bracket"; sets_mode_to = "default"; }; "ctrl-s" = { cmd = "pager-toggle-search"; sets_mode_to = "default"; }; "ctrl-w" = { cmd = "backward-kill-path-component"; sets_mode_to = "default"; }; "alt-o" = { cmd = "__fish_preview_current_file"; sets_mode_to = "default"; }; "left" = { cmd = "backward-char"; sets_mode_to = "default"; }; "shift-left" = { cmd = "backward-bigword"; sets_mode_to = "default"; }; "alt-p" = { cmd = "__fish_paginate"; sets_mode_to = "default"; }; "F" = { cmd = "backward-jump"; sets_mode_to = "default"; }; "ctrl-left" = { cmd = "backward-token"; sets_mode_to = "default"; }; "b" = { cmd = "backward-word"; sets_mode_to = "default"; }; "f1" = { cmd = "__fish_man_page"; sets_mode_to = "default"; }; "shift-delete" = { cmd = "history-delete or backward-delete-char"; sets_mode_to = "default"; }; "\"" = { "+" = { "y" = { cmd = "fish_clipboard_copy; commandline -f end-selection repaint-mode"; sets_mode_to = "default"; }; }; "*" = { "y" = { cmd = "fish_clipboard_copy; commandline -f end-selection repaint-mode"; sets_mode_to = "default"; }; }; }; "shift-tab" = { cmd = "complete-and-search"; sets_mode_to = "default"; }; "alt-b" = { cmd = "prevd-or-backward-word"; sets_mode_to = "default"; }; "#" = { cmd = "__fish_toggle_comment_commandline"; sets_mode_to = "default"; }; "~" = { cmd = "togglecase-selection end-selection repaint-mode"; sets_mode_to = "default"; }; "y" = { cmd = "fish_vi_yank_selection end-selection repaint-mode"; sets_mode_to = "default"; }; "f" = { cmd = "forward-jump"; sets_mode_to = "default"; }; "x" = { cmd = "kill-selection end-selection repaint-mode"; sets_mode_to = "default"; }; "alt-y" = { cmd = "yank-pop"; sets_mode_to = "default"; }; "$" = { cmd = "end-of-line"; sets_mode_to = "default"; }; ";" = { cmd = "repeat-jump"; sets_mode_to = "default"; }; "W" = { cmd = "forward-bigword-vi"; sets_mode_to = "default"; }; "w" = { cmd = "forward-word-vi"; sets_mode_to = "default"; }; "j" = { cmd = "down-line"; sets_mode_to = "default"; }; "k" = { cmd = "up-line"; sets_mode_to = "default"; }; "end" = { cmd = "end-of-line"; sets_mode_to = "default"; }; "down" = { cmd = "down-or-search"; sets_mode_to = "default"; }; "alt-up" = { cmd = "history-token-search-backward"; sets_mode_to = "default"; }; "i" = { cmd = "end-selection repaint-mode"; sets_mode_to = "insert"; }; "g" = { "^" = { cmd = "beginning-of-line"; sets_mode_to = "default"; }; "e" = { cmd = "backward-word-end"; sets_mode_to = "default"; }; "u" = { cmd = "downcase-selection end-selection repaint-mode"; sets_mode_to = "default"; }; "$" = { cmd = "end-of-line"; sets_mode_to = "default"; }; "U" = { cmd = "upcase-selection end-selection repaint-mode"; sets_mode_to = "default"; }; "E" = { cmd = "backward-bigword-end"; sets_mode_to = "default"; }; }; "I" = { cmd = "end-selection beginning-of-line repaint-mode"; sets_mode_to = "insert"; }; "alt-." = { cmd = "history-token-search-backward"; sets_mode_to = "default"; }; "home" = { cmd = "beginning-of-line"; sets_mode_to = "default"; }; "alt-l" = { cmd = "__fish_list_current_token"; sets_mode_to = "default"; }; "ctrl-x" = { cmd = "fish_clipboard_copy"; sets_mode_to = "default"; }; "alt-s" = { cmd = "for cmd in sudo doas please run0; if command -q $cmd; fish_commandline_prepend $cmd; break; end; end"; sets_mode_to = "default"; }; "o" = { cmd = "swap-selection-start-stop repaint-mode"; sets_mode_to = "default"; }; "ctrl-[" = { cmd = "end-selection repaint-mode"; sets_mode_to = "default"; }; "X" = { cmd = "kill-whole-line end-selection repaint-mode"; sets_mode_to = "default"; }; "\\e\\[1\;9B" = { cmd = "history-token-search-forward"; sets_mode_to = "default"; }; "pageup" = { cmd = "beginning-of-history"; sets_mode_to = "default"; }; "ctrl-l" = { cmd = "status test-terminal-feature scroll-content-up && commandline -f scrollback-push clear-screen"; sets_mode_to = "default"; }; "up" = { cmd = "up-or-search"; sets_mode_to = "default"; }; "ctrl-u" = { cmd = "backward-kill-line"; sets_mode_to = "default"; }; "h" = { cmd = "backward-char"; sets_mode_to = "default"; }; "alt-right" = { cmd = "nextd-or-forward-word"; sets_mode_to = "default"; }; "ctrl-y" = { cmd = "yank"; sets_mode_to = "default"; }; "v" = { cmd = "end-selection repaint-mode"; sets_mode_to = "default"; }; "\\e\\[1\;9D" = { cmd = "prevd-or-backward-word"; sets_mode_to = "default"; }; "\\e\\[1\;9C" = { cmd = "nextd-or-forward-word"; sets_mode_to = "default"; }; "0" = { cmd = "beginning-of-line"; sets_mode_to = "default"; }; "ctrl-k" = { cmd = "kill-line"; sets_mode_to = "default"; }; "alt-v" = { cmd = "edit_command_buffer"; sets_mode_to = "default"; }; "ctrl-v" = { cmd = "fish_clipboard_paste"; sets_mode_to = "default"; }; "ctrl-i" = { cmd = "complete"; sets_mode_to = "default"; }; "d" = { cmd = "kill-selection end-selection backward-char repaint-mode"; sets_mode_to = "default"; }; "^" = { cmd = "beginning-of-line"; sets_mode_to = "default"; }; "alt-f" = { cmd = "nextd-or-forward-word"; sets_mode_to = "default"; }; "ctrl-right" = { cmd = "forward-token"; sets_mode_to = "default"; }; "alt-w" = { cmd = "__fish_whatis_current_token"; sets_mode_to = "default"; }; "\\e\\[1\;9A" = { cmd = "history-token-search-backward"; sets_mode_to = "default"; }; "shift-right" = { cmd = "forward-bigword"; sets_mode_to = "default"; }; "E" = { cmd = "forward-bigword-end"; sets_mode_to = "default"; }; "tab" = { cmd = "complete"; sets_mode_to = "default"; }; "B" = { cmd = "backward-bigword"; sets_mode_to = "default"; }; "alt-e" = { cmd = "edit_command_buffer"; sets_mode_to = "default"; }; "alt-d" = { cmd = fromInsert "alt-d"; sets_mode_to = "default"; }; "pagedown" = { cmd = "end-of-history"; sets_mode_to = "default"; }; "c" = { cmd = "kill-selection end-selection repaint-mode"; sets_mode_to = "insert"; }; "alt-left" = { cmd = "prevd-or-backward-word"; sets_mode_to = "default"; }; "comma" = { cmd = "repeat-jump-reverse"; sets_mode_to = "default"; }; "ctrl-d" = { cmd = "delete-or-exit"; sets_mode_to = "default"; }; "escape" = { cmd = "end-selection repaint-mode"; sets_mode_to = "default"; }; }; "F" = { "" = { cmd = "get-key fish_vi_exec_motion commandline --backward-jump=$fish_key set -eg fish_key"; sets_mode_to = "default"; }; }; "t" = { "" = { cmd = "get-key fish_vi_exec_motion commandline --forward-jump-till=$fish_key set -eg fish_key"; sets_mode_to = "default"; }; }; "replace" = { "escape" = { cmd = "cancel repaint-mode"; sets_mode_to = "default"; }; "#" = { cmd = "__fish_toggle_comment_commandline"; sets_mode_to = "default"; }; "ctrl-m" = { cmd = "execute repaint-mode"; sets_mode_to = "insert"; }; "shift-backspace" = { cmd = "backward-char"; sets_mode_to = "default"; }; "ctrl-[" = { cmd = "cancel repaint-mode"; sets_mode_to = "default"; }; "enter" = { cmd = "execute repaint-mode"; sets_mode_to = "insert"; }; "" = { cmd = "delete-char self-insert"; sets_mode_to = "default"; }; "backspace" = { cmd = "backward-char"; sets_mode_to = "default"; }; "ctrl-j" = { cmd = "execute repaint-mode"; sets_mode_to = "insert"; }; }; "replace_one" = { "escape" = { cmd = "cancel repaint-mode"; sets_mode_to = "default"; }; "" = { cmd = "set -g fish_cursor_end_mode exclusive delete-char self-insert backward-char repaint-mode set -g fish_cursor_end_mode inclusive"; sets_mode_to = "default"; }; "ctrl-j" = { cmd = "set -g fish_cursor_end_mode exclusive commandline -f delete-char; commandline -i \\n; commandline -f backward-char repaint-mode set -g fish_cursor_end_mode inclusive"; sets_mode_to = "default"; }; "enter" = { cmd = "set -g fish_cursor_end_mode exclusive commandline -f delete-char; commandline -i \\n; commandline -f backward-char repaint-mode set -g fish_cursor_end_mode inclusive"; sets_mode_to = "default"; }; "ctrl-[" = { cmd = "cancel repaint-mode"; sets_mode_to = "default"; }; "ctrl-m" = { cmd = "set -g fish_cursor_end_mode exclusive commandline -f delete-char; commandline -i \\n; commandline -f backward-char repaint-mode set -g fish_cursor_end_mode inclusive"; sets_mode_to = "default"; }; }; })