From e8678be7015a66f2136f5c10d0f308fe513acd88 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Mon, 27 Jul 2015 21:32:26 -0400 Subject: [PATCH] history-substring-search: bind arrows in both vi and emacs keymaps --- .../history-substring-search.plugin.zsh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/history-substring-search/history-substring-search.plugin.zsh b/plugins/history-substring-search/history-substring-search.plugin.zsh index 25fd3a2da..4c3d30638 100644 --- a/plugins/history-substring-search/history-substring-search.plugin.zsh +++ b/plugins/history-substring-search/history-substring-search.plugin.zsh @@ -15,9 +15,13 @@ fi # Bind terminal-specific up and down keys if [[ -n "$terminfo[kcuu1]" ]]; then - bindkey "$terminfo[kcuu1]" history-substring-search-up + bindkey -M emacs "$terminfo[kcuu1]" history-substring-search-up + bindkey -M viins "$terminfo[kcuu1]" history-substring-search-up + bindkey -M vicmd "$terminfo[kcuu1]" history-substring-search-up fi if [[ -n "$terminfo[kcud1]" ]]; then - bindkey "$terminfo[kcud1]" history-substring-search-down + bindkey -M emacs "$terminfo[kcud1]" history-substring-search-down + bindkey -M viins "$terminfo[kcud1]" history-substring-search-down + bindkey -M vicmd "$terminfo[kcud1]" history-substring-search-down fi