From 47737fd93cd6a0e39617cce05128217f23f65670 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 22 Nov 2024 23:18:09 -0800 Subject: [PATCH] Make zsh word movement keys work more like Emacs --- oni/home/config/common.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/oni/home/config/common.scm b/oni/home/config/common.scm index 594638c..e56eee7 100644 --- a/oni/home/config/common.scm +++ b/oni/home/config/common.scm @@ -89,7 +89,8 @@ (environment-variables '(("HISTFILE" . "$HOME/.zsh/histfile") ("HISTSIZE" . "1000") - ("SAVEHIST" . "1000"))) + ("SAVEHIST" . "1000") + ("WORDCHARS" . ""))) (zshrc (list (mixed-text-file @@ -112,6 +113,10 @@ "bindkey -e '^[w' x-copy-region-as-kill\n" "bindkey -e '^W' x-kill-region\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" "compinit\n" "function horizontal-rule() {\n"