From 9dddf3424e9fef40431d4241de5301db99f60fce Mon Sep 17 00:00:00 2001 From: David Chen Date: Sun, 1 Dec 2019 16:59:13 -0800 Subject: [PATCH] fzf --- zsh/zshrc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index 840d868..32e8e44 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -80,5 +80,12 @@ zle -N zle-keymap-select KEYTIMEOUT=1 -eval "$(pmy init)" -export PMY_TRIGGER_KEY='^t' +# fzf +export FZF_DEFAULT_OPTS='--bind ctrl-e:down,ctrl-u:up --preview "[[ $(file --mime {}) =~ binary ]] && echo {} is a binary file || (bat --style=numbers --color=always {} || highlight -O ansi -l {} || coderay {} || rougify {} || cat {}) 2> /dev/null | head -500"' +export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""' +export FZF_COMPLETION_TRIGGER='\' +source /usr/share/fzf/key-bindings.zsh +source /usr/share/fzf/completion.zsh + +#eval "$(pmy init)" +#export PMY_TRIGGER_KEY='^t'