about summary refs log tree commit diff stats
path: root/modules/by-name/zs/zsh/config/keymaps/emacs.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/zs/zsh/config/keymaps/emacs.zsh')
-rw-r--r--modules/by-name/zs/zsh/config/keymaps/emacs.zsh119
1 files changed, 119 insertions, 0 deletions
diff --git a/modules/by-name/zs/zsh/config/keymaps/emacs.zsh b/modules/by-name/zs/zsh/config/keymaps/emacs.zsh
new file mode 100644
index 00000000..b789faf5
--- /dev/null
+++ b/modules/by-name/zs/zsh/config/keymaps/emacs.zsh
@@ -0,0 +1,119 @@
+bindkey -N emacs
+
+bindkey -M emacs "^[A" accept-and-hold
+bindkey -M emacs "^[a" accept-and-hold
+bindkey -M emacs "^J" accept-line
+bindkey -M emacs "^M" accept-line
+bindkey -M emacs "^O" accept-line-and-down-history
+bindkey -M emacs "^R" atuin-search
+bindkey -M emacs "^[OA" atuin-up-search
+bindkey -M emacs "^[[A" atuin-up-search
+bindkey -M emacs "^B" backward-char
+bindkey -M emacs "^[OD" backward-char
+bindkey -M emacs "^[[D" backward-char
+bindkey -M emacs "^?" backward-delete-char
+bindkey -M emacs "^H" backward-delete-char
+bindkey -M emacs "^W" backward-kill-word
+bindkey -M emacs "^[^?" backward-kill-word
+bindkey -M emacs "^[^H" backward-kill-word
+bindkey -M emacs "^[B" backward-word
+bindkey -M emacs "^[b" backward-word
+bindkey -M emacs "^[<" beginning-of-buffer-or-history
+bindkey -M emacs "^A" beginning-of-line
+bindkey -M emacs "^[[200~" bracketed-paste
+bindkey -M emacs "^[C" capitalize-word
+bindkey -M emacs "^L" clear-screen
+bindkey -M emacs "^[^L" clear-screen
+bindkey -M emacs "^[^_" copy-prev-word
+bindkey -M emacs "^[W" copy-region-as-kill
+bindkey -M emacs "^[w" copy-region-as-kill
+bindkey -M emacs "^D" delete-char-or-list
+bindkey -M emacs "^[0" digit-argument
+bindkey -M emacs "^[1" digit-argument
+bindkey -M emacs "^[2" digit-argument
+bindkey -M emacs "^[3" digit-argument
+bindkey -M emacs "^[4" digit-argument
+bindkey -M emacs "^[5" digit-argument
+bindkey -M emacs "^[6" digit-argument
+bindkey -M emacs "^[7" digit-argument
+bindkey -M emacs "^[8" digit-argument
+bindkey -M emacs "^[9" digit-argument
+bindkey -M emacs "^[L" down-case-word
+bindkey -M emacs "^[l" down-case-word
+bindkey -M emacs "^N" down-line-or-history
+bindkey -M emacs "^[OB" down-line-or-history
+bindkey -M emacs "^[[B" down-line-or-history
+bindkey -M emacs "^[>" end-of-buffer-or-history
+bindkey -M emacs "^E" end-of-line
+bindkey -M emacs "^X^X" exchange-point-and-mark
+bindkey -M emacs "^[z" execute-last-named-cmd
+bindkey -M emacs "^[x" execute-named-cmd
+bindkey -M emacs "^[ " expand-history
+bindkey -M emacs "^[!" expand-history
+bindkey -M emacs "^I" expand-or-complete
+bindkey -M emacs "^X*" expand-word
+bindkey -M emacs "^F" forward-char
+bindkey -M emacs "^[OC" forward-char
+bindkey -M emacs "^[[C" forward-char
+bindkey -M emacs "^[F" forward-word
+bindkey -M emacs "^[f" forward-word
+bindkey -M emacs "^[c" fzf-cd-widget
+bindkey -M emacs "^T" fzf-file-widget
+bindkey -M emacs "^[G" get-line
+bindkey -M emacs "^[g" get-line
+bindkey -M emacs "^Xr" history-incremental-search-backward
+bindkey -M emacs "^S" history-incremental-search-forward
+bindkey -M emacs "^Xs" history-incremental-search-forward
+bindkey -M emacs "^[P" history-search-backward
+bindkey -M emacs "^[p" history-search-backward
+bindkey -M emacs "^[N" history-search-forward
+bindkey -M emacs "^[n" history-search-forward
+bindkey -M emacs "^X^N" infer-next-history
+bindkey -M emacs "^[." insert-last-word
+bindkey -M emacs "^[_" insert-last-word
+bindkey -M emacs "^X^K" kill-buffer
+bindkey -M emacs "^K" kill-line
+bindkey -M emacs "^U" kill-whole-line
+bindkey -M emacs "^[D" kill-word
+bindkey -M emacs "^[d" kill-word
+bindkey -M emacs "^[^D" list-choices
+bindkey -M emacs "^XG" list-expand
+bindkey -M emacs "^Xg" list-expand
+bindkey -M emacs "^[-" neg-argument
+bindkey -M emacs "^X^O" overwrite-mode
+bindkey -M emacs "^Q" push-line
+bindkey -M emacs "^[Q" push-line
+bindkey -M emacs "^[q" push-line
+bindkey -M emacs "^['" quote-line
+bindkey -M emacs "^[\"" quote-region
+bindkey -M emacs "^V" quoted-insert
+bindkey -M emacs "^[H" run-help
+bindkey -M emacs "^[h" run-help
+bindkey -R -M emacs " "-"~" self-insert
+bindkey -R -M emacs "\M-^@"-"\M-^?" self-insert
+bindkey -M emacs "^[^I" self-insert-unmeta
+bindkey -M emacs "^[^J" self-insert-unmeta
+bindkey -M emacs "^[^M" self-insert-unmeta
+bindkey -M emacs "^G" send-break
+bindkey -M emacs "^[^G" send-break
+bindkey -M emacs "^@" set-mark-command
+bindkey -M emacs "^[S" spell-word
+bindkey -M emacs "^[\$" spell-word
+bindkey -M emacs "^[s" spell-word
+bindkey -M emacs "^[T" transpose-words
+bindkey -M emacs "^[t" transpose-words
+bindkey -M emacs "^X^U" undo
+bindkey -M emacs "^Xu" undo
+bindkey -M emacs "^_" undo
+bindkey -M emacs "^[U" up-case-word
+bindkey -M emacs "^[u" up-case-word
+bindkey -M emacs "^P" up-line-or-history
+bindkey -M emacs "^X^V" vi-cmd-mode
+bindkey -M emacs "^X^F" vi-find-next-char
+bindkey -M emacs "^[|" vi-goto-column
+bindkey -M emacs "^X^J" vi-join
+bindkey -M emacs "^X^B" vi-match-bracket
+bindkey -M emacs "^X=" what-cursor-position
+bindkey -M emacs "^[?" which-command
+bindkey -M emacs "^Y" yank
+bindkey -M emacs "^[y" yank-pop