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
# Display top 3 lines as the fixed header
fzf --preview 'bat --style=full --color=always {}' --preview-window '~3'# Works well with the streaming preview
fzf --preview-window 'follow:~2' --preview 'for i in $(seq 100000); do # Clear preview content every 300 lines and print header (( i % 300 == 1 )) && echo -e "\x1b[2J$i ~ $((i + 300))" && echo '---' echo "$i" sleep 0.01done'
More advanced preview offset expression to better support the fixed header
# Preview with bat, matching line in the middle of the window below# the fixed header of the top 3 lines## ~3 Top 3 lines as the fixed header# +{2} Base scroll offset extracted from the second field# +3 Extra offset to compensate for the 3-line header# /2 Put in the middle of the preview area#
git grep --line-number ''|
fzf --layout reverse --delimiter : \
--preview 'bat --style=full --color=always --highlight-line {2} {1}' \
--preview-window '~3:+{2}+3/2'
Added select and deselect action for unconditionally selecting or
deselecting a single item in --multi mode. Complements toggle action.
Sigificant performance improvement in ANSI code processing