junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
63.72k stars 2.37k forks source link

Use vim as previewer #3430

Open thealio opened 1 year ago

thealio commented 1 year ago

Info

Problem / Steps to reproduce

Hi

I'd like to use vim as a previewer for fzf

fzf --preview='vim -RMn --not-a-terminal {}' --bind shift-up:preview-page-up,shift-down:preview-page-down

But I'm encountering two issues:

So, I'd like to use vim for previews in fzf, with the same behavior of other tools, like bat or cat

junegunn commented 1 year ago

Have you considered using scripts like vimcat? (It looks like there are a number of forks and I don't know which one works the best.)

thealio commented 1 year ago

Have you considered using scripts like vimcat? (It looks like there are a number of forks and I don't know which one works the best.)

It doesn't work for me Also , a pager is needed to work (with cat , I use piping into less : cat | less )