From 735988c87d462b86e0d749abdb01a39fe070c522 Mon Sep 17 00:00:00 2001 From: tokiclover Date: Thu, 2 Oct 2014 06:58:52 +0200 Subject: [PATCH] modules: editor: set a common (emacs/vi) "\E"{B,b}|{F,f} backwar|forward word (no emacs favoritism) --- modules/editor/init.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/editor/init.zsh b/modules/editor/init.zsh index 9a347a0948..d8aa59f64f 100644 --- a/modules/editor/init.zsh +++ b/modules/editor/init.zsh @@ -206,8 +206,6 @@ bindkey -d # Emacs Key Bindings # -for key ("$key_info[Escape]"{B,b}) bindkey -M emacs "$key" emacs-backward-word -for key ("$key_info[Escape]"{F,f}) bindkey -M emacs "$key" emacs-forward-word bindkey -M emacs "$key_info[Escape]$key_info[Left]" emacs-backward-word bindkey -M emacs "$key_info[Escape]$key_info[Right]" emacs-forward-word @@ -268,6 +266,9 @@ for keymap in 'emacs' 'viins'; do bindkey -M "$keymap" "$key_info[Left]" backward-char bindkey -M "$keymap" "$key_info[Right]" forward-char + for key ("$key_info[Escape]"{B,b}) bindkey -M "$keymap" "$key" backward-word + for key ("$key_info[Escape]"{F,f}) bindkey -M "$keymap" "$key" forward-word + # Expand history on space. bindkey -M "$keymap" ' ' magic-space