X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=f8adacf317b64b7cde56d1c258c74e47a93dcf2c;hb=861dc978760ca60aced1dc14dea0ac72c01f002b;hp=9e8edd262f67197c44ab3441b53a655f5987f044;hpb=3742d8b34552762cc3627dde22975b5c94d33b22;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index 9e8edd2..f8adacf 100644 --- a/zsh/rc +++ b/zsh/rc @@ -153,6 +153,7 @@ setopt incappendhistory setopt histignoredups # Don't add lines starting with a space to the history. setopt histignorespace + # Vim like completions of previous executed commands (also enter Vi-mode). If # called at the beginning it just recalls old commands (like cursor up), if # called after typing something, only lines starting with the typed text are @@ -181,6 +182,14 @@ bindkey -a '^P' history-beginning-search-backward # binding for Vi-mode # after calling ^P. bindkey -a '^N' history-beginning-search-forward +# Enable incremental search which is especially useful when the string is an +# argument and not the command. +bindkey '^R' history-incremental-search-backward +# Also enable my usual use of Ctrl-P/Ctrl-N to get the previous/next matching +# history entry. +bindkey -M isearch '^P' history-incremental-search-backward +bindkey -M isearch '^N' history-incremental-search-forward + # Automatically push cd-ed directories on the directory stack. setopt autopushd # Don't push duplicates on the directory stack.