Add fzf-tab

This commit is contained in:
2022-10-03 04:07:06 -07:00
parent 6f553fda86
commit f7b05d20d1
3 changed files with 27 additions and 0 deletions

View File

@ -161,6 +161,23 @@ __ZSH_LOCAL_FILE="${ZSH_CONFIG_DIR}/local.zsh"
# THE FOLLOWING PLUGINS MUST COME LAST
# FZF Integration
load_plugin fzf-tab
# Disable sort when completing `git checkout`
zstyle ':completion:*:git-checkout:*' sort false
# Set descriptions format to enable group support
zstyle ':completion:*:descriptions' format '[%d]'
# Set list-colors to enable filename colorizing
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
# Preview directory's content with exa when completing cd
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'exa -1 --color=always $realpath'
# Remove the '.' prefix at the start of every completion
zstyle ':fzf-tab:*' prefix ''
# Switch groups
zstyle ':fzf-tab:*' switch-group 'ctrl-h' 'ctrl-l'
# Toggle selected for all visible entries
zstyle ':fzf-tab:*' fzf-bindings 'ctrl-a:toggle-all'
# More completions
load_plugin zsh-completions