Make zsh word movement keys work more like Emacs

This commit is contained in:
Tom Willemse 2024-11-22 23:18:09 -08:00
parent 4b938b24df
commit 47737fd93c
Signed by: ryuslash
GPG key ID: 7D5C407B435025C1

View file

@ -89,7 +89,8 @@
(environment-variables (environment-variables
'(("HISTFILE" . "$HOME/.zsh/histfile") '(("HISTFILE" . "$HOME/.zsh/histfile")
("HISTSIZE" . "1000") ("HISTSIZE" . "1000")
("SAVEHIST" . "1000"))) ("SAVEHIST" . "1000")
("WORDCHARS" . "")))
(zshrc (zshrc
(list (list
(mixed-text-file (mixed-text-file
@ -112,6 +113,10 @@
"bindkey -e '^[w' x-copy-region-as-kill\n" "bindkey -e '^[w' x-copy-region-as-kill\n"
"bindkey -e '^W' x-kill-region\n" "bindkey -e '^W' x-kill-region\n"
"bindkey -e '^Y' x-yank\n" "bindkey -e '^Y' x-yank\n"
"bindkey -e '^[f' emacs-forward-word\n"
"bindkey -e '^[F' emacs-forward-word\n"
"bindkey -e '^[b' emacs-backward-word\n"
"bindkey -e '^[B' emacs-backward-word\n"
"autoload -Uz compinit\n" "autoload -Uz compinit\n"
"compinit\n" "compinit\n"
"function horizontal-rule() {\n" "function horizontal-rule() {\n"