You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can preview the content of the file under the cursor by setting --preview option.
# Using highlight (https://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'"
Using --select-1 and/or --exit-0
export FZF_CTRL_T_OPTS="--select-1 --exit-0"
--select-1 automatically selects the item if there's only one so that you don't have to press enter key. Likewise, --exit-0 automatically exits when the list is empty. These options are also useful in FZF_ALT_C_OPTS.
CTRL-R
Sorting and exact matching
Sorting by relevance is enabled by default. You can dynamically switch to chronological order by pressing CTRL-R again, but if you like it to be enabled by default, add --no-sort to FZF_CTRL_R_OPTS. Likewise, if you prefer to use exact (non-fuzzy) matching, add --exact.
export FZF_CTRL_R_OPTS='--no-sort --exact'
Full command on preview window
Commands that are too long are not fully visible on screen. We can use --preview option to display the full command on the preview window. In the following example, we bind ? key for toggling the preview window.