Use vim as previewer
Author: thealioCreated Sep 6, 2023Updated Sep 2, 2026
- I have read through the manual page (
man fzf) - I have the latest version of fzf
- I have searched through the existing issues
Info
- OS
- Linux
- Mac OS X
- Windows
- Etc.
- Shell
- bash
- zsh
- fish
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:
- On the top there are the file and folder infos, with also some ANSI characters , that are putted over the text, ruining the readibility if the preview
- The --bind flag seems do not work
So, I'd like to use vim for previews in fzf, with the same behavior of other tools, like bat or cat
Source: junegunn/fzf