Skip to content

Commit

Permalink
[Fix sorin-ionescu#422] Revert "Remove no longer necessary key bindings"
Browse files Browse the repository at this point in the history
This reverts commit 3c5363e.
  • Loading branch information
sorin-ionescu authored and matthoffman committed Sep 18, 2014
1 parent 6e08bba commit b3a27b3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions modules/history-substring-search/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,23 @@ if ! zstyle -t ':prezto:module:history-substring-search' color; then
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND}
fi

#
# Key Bindings
#

if [[ -n $key_info ]]; then
# 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
fi

0 comments on commit b3a27b3

Please sign in to comment.