diff --git a/.config/fish/conf.d/fzf.fish b/.config/fish/conf.d/fzf.fish index 8156c11b..82c45c98 100644 --- a/.config/fish/conf.d/fzf.fish +++ b/.config/fish/conf.d/fzf.fish @@ -9,9 +9,8 @@ end # This variable is global so that it can be referenced by fzf_configure_bindings and in tests set --global _fzf_search_vars_command '_fzf_search_variables (set --show | psub) (set --names | psub)' - # Install the default bindings, which are mnemonic and minimally conflict with fish's preset bindings -fzf_configure_bindings +# fzf_configure_bindings # Doesn't erase autoloaded _fzf_* functions because they are not easily accessible once key bindings are erased function _fzf_uninstall --on-event fzf_uninstall diff --git a/.config/fish/conf.d/fzf_config.fish b/.config/fish/conf.d/fzf_config.fish index 6a9453bd..35f7d0ca 100644 --- a/.config/fish/conf.d/fzf_config.fish +++ b/.config/fish/conf.d/fzf_config.fish @@ -18,3 +18,18 @@ set -gx FZF_DEFAULT_OPTS " --color=border:#a7a7a7 --color=query:#d5d5d5 --color=gutter:#121212" + +set -gx FZF_DEFAULT_COMMAND "fd --hidden --strip-cwd-prefix --exclude .git --exclude .anaconda --exclude .cache --exclude .conda --exclude .cmake --exclude '.dart*' --exclude '.git*' --exclude .java --exclude .librewolf --exclude .pub-cache --exclude .opm" +set -gx FZF_CTRL_T_COMMAND $FZF_DEFAULT_COMMAND +set -gx FZF_ALT_C_COMMAND "fd --type=d --hidden --strip-cwd-prefix --exclude .git --exclude .anaconda --exclude .cache --exclude .conda --exclude .cmake --exclude '.dart*' --exclude '.git*' --exclude .java --exclude .librewolf --exclude .pub-cache --exclude .opm" +set -gx export FZF_CTRL_R_OPTS " + --reverse + --cycle + --info=right + --color header:italic + --header 'alt+s (pet new)' + --preview 'echo {}' --preview-window down:3:hidden:wrap + --bind '?:toggle-preview'" +# --bind 'alt-s:execute(pet new --tag {2..})+abort'" +set -gx FZF_CTRL_T_OPTS "--preview 'bat --color=always -n --line-range :500 {}'" +set -gx FZF_ALT_C_OPTS "--preview 'eza --tree --color=always {} | head -200'" diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 52e8bd64..fd303765 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -4,5 +4,5 @@ if status is-interactive direnv hook fish | source zoxide init fish | source thefuck --alias | source - fzf --fish | FZF_CTRL_R_COMMAND= source + fzf --fish | source && fzf_configure_bindings end