From 487331e935b9a1ef6636273673541b0321fa4012 Mon Sep 17 00:00:00 2001 From: rydesun Date: Mon, 2 Aug 2021 18:16:54 +0800 Subject: [PATCH] Fix fzf keybind --- .config/zsh/zshrc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.config/zsh/zshrc b/.config/zsh/zshrc index 26bdd30..1cde4d6 100644 --- a/.config/zsh/zshrc +++ b/.config/zsh/zshrc @@ -2,6 +2,7 @@ setopt no_beep # 不响铃 setopt correct # 修正命令 setopt interactive_comments # 交互模式支持注释 +bindkey -e # Emacs按键绑定 fpath=(${ZDOTDIR}/functions ${ZDOTDIR}/Completion $fpath) @@ -72,7 +73,7 @@ zstyle ':completion:*' matcher-list '' 'm:{-a-zA-Z}={_A-Za-z}' if [[ -f /usr/share/fzf/completion.zsh ]]; then source /usr/share/fzf/completion.zsh fi -export FZF_COMPLETION_TRIGGER='~~' +export FZF_COMPLETION_TRIGGER='' export FZF_DEFAULT_COMMAND='fd -uu -E .git -E .node_modules' export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" @@ -87,8 +88,6 @@ done; unset i # >>>----------------------------------- # 按键绑定 <<<-------------------------- -# 默认Emacs -bindkey -e # 用$EDITOR编辑命令 autoload -Uz edit-command-line zle -N edit-command-line @@ -107,6 +106,10 @@ bindkey '^l' scroll-and-clear-screen if [[ -f /usr/share/fzf/key-bindings.zsh ]]; then source /usr/share/fzf/key-bindings.zsh fi +bindkey '^T' fzf-completion +# 恢复TAB键的行为 +bindkey '^I' $fzf_default_completion + # 默认 WORDCHARS='*?_-.[]~=/&;!#$%^(){}<>' export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' # >>>-----------------------------------