From d22effbf856427b281b455a7419edfdd67aab3ce Mon Sep 17 00:00:00 2001 From: Yutian Li Date: Mon, 11 Feb 2019 19:21:38 -0500 Subject: [PATCH] editor: allow alt+arrow keys for word movement (#1688) --- modules/editor/init.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/editor/init.zsh b/modules/editor/init.zsh index 085947ef..3a7d66e6 100644 --- a/modules/editor/init.zsh +++ b/modules/editor/init.zsh @@ -269,9 +269,11 @@ bindkey -d # Emacs Key Bindings # -for key in "$key_info[Escape]"{B,b} "${(s: :)key_info[ControlLeft]}" +for key in "$key_info[Escape]"{B,b} "${(s: :)key_info[ControlLeft]}" \ + "${key_info[Escape]}${key_info[Left]}" bindkey -M emacs "$key" emacs-backward-word -for key in "$key_info[Escape]"{F,f} "${(s: :)key_info[ControlRight]}" +for key in "$key_info[Escape]"{F,f} "${(s: :)key_info[ControlRight]}" \ + "${key_info[Escape]}${key_info[Right]}" bindkey -M emacs "$key" emacs-forward-word # Kill to the beginning of the line.