From 81da12976ef24d20d345a730c191da22badd35dc Mon Sep 17 00:00:00 2001 From: surtur Date: Fri, 18 Aug 2023 16:53:09 +0200 Subject: [PATCH] zshrc: tweak fzf options --- .zshrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.zshrc b/.zshrc index a4ffe2c..fad05c7 100644 --- a/.zshrc +++ b/.zshrc @@ -123,13 +123,17 @@ bindkey '^\' accept-and-hold HISTORY_SUBSTRING_SEARCH_FUZZY=" " - export FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude 'node_modules' ." - export FZF_CTRL_T_COMMAND="fd --follow --full-path --hidden --base-directory . --exclude '.git' --exclude 'node_modules' ." + export FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude 'node_modules' --exclude 'nix/profiles' ." + + # export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" + export FZF_CTRL_T_COMMAND="fd --follow --full-path --hidden --base-directory . --exclude '.git' --exclude 'node_modules' --exclude 'nix/profiles' ." export FZF_ALT_C_COMMAND="fd -H -t d ." export DISABLE_FZF_AUTO_COMPLETION="true" # Options to fzf command export FZF_COMPLETION_OPTS='+c -x' - export FZF_DEFAULT_OPTS="--height=60% --inline-info --color=fg:#f8f8f2,bg:#282a36,hl:#bd93f9 --color=fg+:#f8f8f2,bg+:#44475a,hl+:#bd93f9 --color=info:#ffb86c,prompt:#50fa7b,pointer:#ff79c6 --color=marker:#ff79c6,spinner:#ffb86c,header:#6272a4" + export FZF_DEFAULT_OPTS="--height=60% --inline-info --bind=ctrl-j:preview-half-page-down,ctrl-k:preview-half-page-up --color=fg:#f8f8f2,bg:#282a36,hl:#bd93f9 --color=fg+:#f8f8f2,bg+:#44475a,hl+:#bd93f9 --color=info:#ffb86c,prompt:#50fa7b,pointer:#ff79c6 --color=marker:#ff79c6,spinner:#ffb86c,header:#6272a4" + # Using highlight (http://www.andre-simon.de/doku/highlight/en/highlight.html) + # export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'" export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always --line-range :200 {}'" # if [[ "$(hostnamectl hostname)" == "leo" ]]; then