Skip to content

Instantly share code, notes, and snippets.

@nickccm1122
Last active July 21, 2019 09:55
Show Gist options
  • Save nickccm1122/b1518f8e7103b8d3c85e738c0a9fba50 to your computer and use it in GitHub Desktop.
Save nickccm1122/b1518f8e7103b8d3c85e738c0a9fba50 to your computer and use it in GitHub Desktop.
fzf config
#!/usr/bin/sh
# Setup fzf
# ---------
if [[ ! "$PATH" == */usr/local/opt/fzf/bin* ]]; then
export PATH="$PATH:/usr/local/opt/fzf/bin"
fi
# Custom settings
# ------------
# export FZF_DEFAULT_COMMAND="fd --type f"
export FZF_DEFAULT_OPTS="--height 100% --layout=reverse --inline-info"
export FZF_CTRL_T_COMMAND="fd --type f"
export FZF_CTRL_T_OPTS="\
--height 100% \
--layout=reverse \
--inline-info \
--preview '(bat --style=numbers --color=always {} || highlight -O ansi -l {} || cat {}) 2> /dev/null | head -200'"
export FZF_CTRL_R_OPTS="--height 100% --layout=reverse --inline-info"
export FZF_ALT_C_OPTS="--height 100% --preview 'exa --tree --level=5 {} | head -200'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment