about summary refs log tree commit diff stats
path: root/modules/by-name/zs/zsh/config/keymaps/viins.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/zs/zsh/config/keymaps/viins.zsh')
-rw-r--r--modules/by-name/zs/zsh/config/keymaps/viins.zsh55
1 files changed, 55 insertions, 0 deletions
diff --git a/modules/by-name/zs/zsh/config/keymaps/viins.zsh b/modules/by-name/zs/zsh/config/keymaps/viins.zsh
new file mode 100644
index 00000000..4e76cdec
--- /dev/null
+++ b/modules/by-name/zs/zsh/config/keymaps/viins.zsh
@@ -0,0 +1,55 @@
+bindkey -N viins
+
+# Completion Debugging
+bindkey -M viins "^[~" _bash_complete-word
+bindkey -M viins "^X~" _bash_list-choices
+bindkey -M viins "^X?" _complete_debug
+bindkey -M viins "^Xh" _complete_help
+bindkey -M viins "^Xt" _complete_tag
+bindkey -M viins "^XC" _correct_filename
+bindkey -M viins "^Xc" _correct_word
+bindkey -M viins "^Xa" _expand_alias
+bindkey -M viins "^Xe" _expand_word
+bindkey -M viins "^Xd" _list_expansions
+bindkey -M viins "^Xm" _most_recent_file
+bindkey -M viins "^Xn" _next_tags
+bindkey -M viins "^X^R" _read_comp
+bindkey -M viins "^[," _history-complete-newer
+bindkey -M viins "^[/" _history-complete-older
+
+bindkey -M viins "^J" accept-line
+bindkey -M viins "^M" accept-line
+bindkey -M viins "^L" clear-screen
+
+bindkey -M viins "^R" atuin-search-viins
+bindkey -M viins "^V" edit-command-line
+
+bindkey -M viins "^[[A" history-substring-search-up   # UP ARROW
+bindkey -M viins "^[OA" history-substring-search-up   # UP ARROW
+bindkey -M viins "^[[B" history-substring-search-down # DOWN ARROW
+bindkey -M viins "^[OB" history-substring-search-down # DOWN ARROW
+
+bindkey -M viins "^[[C" beep # RIGHT ARROW
+bindkey -M viins "^[OC" beep # RIGHT ARROW
+bindkey -M viins "^[[D" beep # LEFT ARROW
+bindkey -M viins "^[OD" beep # LEFT ARROW
+
+# Self inserts
+bindkey -M viins "^K" self-insert
+bindkey -M viins "^S" self-insert
+bindkey -R -M viins "\M-^@"-"\M-^?" self-insert
+bindkey -R -M viins "^A"-"^C" self-insert
+bindkey -R -M viins "^E"-"^F" self-insert
+bindkey -R -M viins "^N"-"^P" self-insert
+bindkey -R -M viins "^Y"-"^Z" self-insert
+bindkey -R -M viins "^\\\\"-"~" self-insert
+
+bindkey -M viins "^[" vi-cmd-mode # ESC
+
+# Support pasted text (and other terminal stuff)
+bindkey -M viins "^[[200~" bracketed-paste
+bindkey -M viins "^[[2~" overwrite-mode
+bindkey -M viins "^[[3~" delete-char
+bindkey -M viins "^?" vi-backward-delete-char
+bindkey -M viins "^[[5~" beginning-of-buffer-or-history
+bindkey -M viins "^[[6~" end-of-buffer-or-history