From 2250f93fa3d9deaddbf4b8c09401496a087d8436 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Tue, 7 Aug 2012 20:38:14 -0400 Subject: [PATCH] [Fix #233] Bind history-substring-search using $key_info --- modules/history-substring-search/init.zsh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/history-substring-search/init.zsh b/modules/history-substring-search/init.zsh index 3be60aba..86fa1039 100644 --- a/modules/history-substring-search/init.zsh +++ b/modules/history-substring-search/init.zsh @@ -24,8 +24,17 @@ fi # Key Bindings # +# Emacs bindkey -M emacs "$key_info[Control]P" history-substring-search-up bindkey -M emacs "$key_info[Control]N" history-substring-search-down + +# Vi bindkey -M vicmd "k" history-substring-search-up bindkey -M vicmd "j" history-substring-search-down +# Emacs and Vi +for keymap in 'emacs' 'viins'; do + bindkey -M "$keymap" "$key_info[Up]" history-substring-search-up + bindkey -M "$keymap" "$key_info[Down]" history-substring-search-down +done +