-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Configuring fuzzy completion
Henré Botha edited this page Oct 27, 2025
·
8 revisions
See https://github.com/junegunn/fzf/wiki/Configuring-shell-key-bindings#changing-the-layout
Instead of using TAB key with a trigger sequence (**<TAB>), you can assign a dedicated key for fuzzy completion while retaining the default behavior of TAB key.
Add the following lines after eval "$(fzf --zsh)" (or source <(fzf --zsh) or source ~/.fzf.zsh)
export FZF_COMPLETION_TRIGGER=''
bindkey '^T' fzf-completion
bindkey '^I' $fzf_default_completionThen CTRL-T will trigger context-aware fuzzy completion.
For bash, see https://github.com/junegunn/fzf/issues/1804.
setopt vi resets TAB key binding, so unless you've assigned a dedicated key, fuzzy completion will become unavailable.
> bindkey '^I'
"^I" fzf-completion
> setopt vi
> bindkey '^I'
"^I" expand-or-completeSo make sure that .fzf.zsh (or completion.zsh) is sourced after setopt vi.