dotfiles

My dotfiles for Arch Linux
git clone git://git.janispagel.de/dotfiles.git
Log | Files | Refs | README

commit 5daa18e7a427a6e99936491f0ca76d3c0a70e6b3
parent f2862e2c1b4a78f3639ee489943f31a32c5fb6da
Author: Janis Pagel <janis.pagel@ims.uni-stuttgart.de>
Date:   Fri, 11 Dec 2020 21:38:59 +0100

Customize fzf keybindings

Use fd with customized settings

Diffstat:
Mzsh/.config/zsh/dot-zshrc | 17++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/zsh/.config/zsh/dot-zshrc b/zsh/.config/zsh/dot-zshrc @@ -95,9 +95,24 @@ fi #if [ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then # source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh #fi -# fzf file history +# fzf commands (command history, changing directory, finding files if [ -f /usr/share/fzf/key-bindings.zsh ]; then source /usr/share/fzf/key-bindings.zsh + fzf-file-widget-fd() { + FZF_CTRL_T_COMMAND='fd --hidden --follow --exclude ".git" --exclude ".venv" .' + fzf-file-widget + unset FZF_CTRL_T_COMMAND + } + fzf-cd-widget-fd() { + FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude ".git" --exclude ".venv" --search-path . --search-path ~' + fzf-cd-widget + unset FZF_ALT_C_COMMAND + } + # Bind fzf-fd functions + zle -N fzf-file-widget-fd + bindkey '^F' fzf-file-widget-fd + zle -N fzf-cd-widget-fd + bindkey '\ec' fzf-cd-widget-fd fi ######################