Skip to content

Instantly share code, notes, and snippets.

@8q
Last active September 23, 2022 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 8q/cadc75d70a23d8cd93dca25c1716d413 to your computer and use it in GitHub Desktop.
Save 8q/cadc75d70a23d8cd93dca25c1716d413 to your computer and use it in GitHub Desktop.
fzf ~/.fdignore
/Applications/
/Library/
/.Trash/
/.gradle/
/.cache/
/.nodebrew/
/.npm/
/.pyenv/
/go/
# fzf
export FZF_CTRL_T_COMMAND='fd --strip-cwd-prefix --hidden --no-ignore-vcs'
export FZF_ALT_C_COMMAND='fd --type d --strip-cwd-prefix --hidden --no-ignore-vcs'
export FZF_DEFAULT_OPTS='--reverse --border --height 100%'
export FZF_ALT_C_OPTS='--preview "tree -aiC -L 1 {}"'
export FZF_CTRL_T_OPTS='--preview "bat --color=always --style=header,grid --line-range :100 {}"'
export FZF_CTRL_R_OPTS=$(cat <<"EOF"
--preview-window up,20,wrap
--preview '
/bin/echo {2..} \
| sed -e s/\\\\n/\\n/g -e s/\\\\t/\\t/g \
| bat -lsh --color=always --style=snip --theme=Dracula
'
EOF
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment