From 308e46e5753a2390621fa17dde769a599e427285 Mon Sep 17 00:00:00 2001 From: xinyz Date: Sat, 23 Jul 2022 10:05:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9zsh=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zsh/zshrc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/zsh/zshrc b/zsh/zshrc index f40faed..4aef1f8 100755 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -71,3 +71,22 @@ export PROMPT='%F{blue}(%n@%m)%f %~ %(!.#.$) ' # +-----------------+ source $DOTFILES/zsh/plugins/autosuggestions/zsh-autosuggestions.zsh +# Better searching in command mode +bindkey -M vicmd '?' history-incremental-search-backward +bindkey -M vicmd '/' history-incremental-search-forward + +# Beginning search with arrow keys +bindkey "^[OA" history-beginning-search-backward +bindkey "^[OB" history-beginning-search-forward +bindkey "^[[A" history-beginning-search-backward +bindkey "^[[B" history-beginning-search-forward +bindkey -M vicmd "k" history-beginning-search-backward +bindkey -M vicmd "j" history-beginning-search-forward + +# Make Vi mode transitions faster (KEYTIMEOUT is in hundredths of a second) +export KEYTIMEOUT=1 + +bindkey "^R" history-incremental-search-backward +bindkey "^S" history-incremental-search-forward + +test -f $ZDOTDIR/zshrc.local && . $ZDOTDIR/zshrc.local