mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-23 05:38:01 +00:00
[Fix #75] Bind history-substring-search in itself
This commit is contained in:
parent
1b32cf7bba
commit
ec3738c8d5
19
keyboard.zsh
19
keyboard.zsh
@ -139,13 +139,6 @@ bindkey -M emacs "$keyinfo[Control]X$keyinfo[Control]]" vi-match-bracket
|
|||||||
# Edit command in an external editor.
|
# Edit command in an external editor.
|
||||||
bindkey -M emacs "$keyinfo[Control]X$keyinfo[Control]E" edit-command-line
|
bindkey -M emacs "$keyinfo[Control]X$keyinfo[Control]E" edit-command-line
|
||||||
|
|
||||||
# Bind to the history substring search plugin if enabled;
|
|
||||||
# otherwise, bind to built-in Zsh history search.
|
|
||||||
if (( $+plugins[(er)history-substring-search] )); then
|
|
||||||
bindkey -M emacs "$keyinfo[Control]P" history-substring-search-up
|
|
||||||
bindkey -M emacs "$keyinfo[Control]N" history-substring-search-down
|
|
||||||
fi
|
|
||||||
|
|
||||||
if (( $+widgets[history-incremental-pattern-search-backward] )); then
|
if (( $+widgets[history-incremental-pattern-search-backward] )); then
|
||||||
bindkey -M emacs "$keyinfo[Control]R" \
|
bindkey -M emacs "$keyinfo[Control]R" \
|
||||||
history-incremental-pattern-search-backward
|
history-incremental-pattern-search-backward
|
||||||
@ -173,13 +166,6 @@ bindkey -M viins "kj" vi-cmd-mode
|
|||||||
bindkey -M vicmd "gg" beginning-of-history
|
bindkey -M vicmd "gg" beginning-of-history
|
||||||
bindkey -M vicmd "G" end-of-history
|
bindkey -M vicmd "G" end-of-history
|
||||||
|
|
||||||
# Bind to the history substring search plugin if enabled;
|
|
||||||
# otherwise, bind to built-in Zsh history search.
|
|
||||||
if (( $+plugins[(er)history-substring-search] )); then
|
|
||||||
bindkey -M vicmd "k" history-substring-search-up
|
|
||||||
bindkey -M vicmd "j" history-substring-search-down
|
|
||||||
fi
|
|
||||||
|
|
||||||
if (( $+widgets[history-incremental-pattern-search-backward] )); then
|
if (( $+widgets[history-incremental-pattern-search-backward] )); then
|
||||||
bindkey -M vicmd "?" history-incremental-pattern-search-backward
|
bindkey -M vicmd "?" history-incremental-pattern-search-backward
|
||||||
bindkey -M vicmd "/" history-incremental-pattern-search-forward
|
bindkey -M vicmd "/" history-incremental-pattern-search-forward
|
||||||
@ -203,11 +189,6 @@ for keymap in 'emacs' 'viins'; do
|
|||||||
# Expand history on space.
|
# Expand history on space.
|
||||||
bindkey -M "$keymap" ' ' magic-space
|
bindkey -M "$keymap" ' ' magic-space
|
||||||
|
|
||||||
if (( $+plugins[(er)history-substring-search] )); then
|
|
||||||
bindkey -M "$keymap" "$keyinfo[Up]" history-substring-search-up
|
|
||||||
bindkey -M "$keymap" "$keyinfo[Down]" history-substring-search-down
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Clear screen.
|
# Clear screen.
|
||||||
bindkey -M "$keymap" "$keyinfo[Control]L" clear-screen
|
bindkey -M "$keymap" "$keyinfo[Control]L" clear-screen
|
||||||
|
|
||||||
|
@ -17,3 +17,8 @@ if ! zstyle -t ':omz:plugin:history-substring-search' color; then
|
|||||||
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
|
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
bindkey -M emacs "$keyinfo[Control]P" history-substring-search-up
|
||||||
|
bindkey -M emacs "$keyinfo[Control]N" history-substring-search-down
|
||||||
|
bindkey -M vicmd "k" history-substring-search-up
|
||||||
|
bindkey -M vicmd "j" history-substring-search-down
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user