X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=908896121d042ad4f7123c04a9367b7a9c48ae1a;hb=1fca0311a9b2f77e4f48e7dfaec3bee82e13ec97;hp=09264ed39e0588f4aac8a732bfc6ad190726cb8d;hpb=ec5e39a4038ef025239ea81db2cb20832757c0cb;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index 09264ed..9088961 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,16 @@ 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. +if [[ $ZSH_VERSION == (4.<4->*|<5->*) ]]; then + bindkey -M isearch '^P' history-incremental-search-backward + bindkey -M isearch '^N' history-incremental-search-forward +fi + # Automatically push cd-ed directories on the directory stack. setopt autopushd # Don't push duplicates on the directory stack. @@ -826,6 +837,11 @@ elif (( $+commands[zathura] )); then compdef _xpdf pdf fi +# Better viewer for info pages .. just pipe everything into less. +info() { + command info "$@" 2>/dev/null | less +} + # OS SPECIFIC SETTINGS