diff options
Diffstat (limited to '')
-rw-r--r-- | .zsh/zshrc | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -226,6 +226,7 @@ _set_cwd # Key bindings {{{ ################################################# bindkey -e # use emacs style :) + if is-at-least 4.3.9; then bindkey "^R" history-incremental-pattern-search-backward bindkey "^S" history-incremental-pattern-search-forward @@ -239,7 +240,6 @@ bindkey "^[-" copy-prev-word # delete previous word upto next whitespace bindkey "^ew" backward-kill-word - # some 'insert x before' things for word c in sudo s vim v AK a; do eval "insert-$word() { LBUFFER=\"$word \$LBUFFER\" }" @@ -247,6 +247,18 @@ for word c in sudo s vim v AK a; do bindkey "^[i$c" insert-$word done +# use only local history on arrow-up +# but also imported one when using C-r +zle-line-init() { NUMERIC=1 zle set-local-history } +zle -N zle-line-init + +zle-isearch-update() { NUMERIC=0 zle set-local-history } +zle -N zle-isearch-update + +zle-isearch-exit() { NUMERIC=1 zle set-local-history } +zle -N zle-isearch-exit + +# fix Del, Pos1, End case $TERM in xterm*) bindkey "^[OH" beginning-of-line |