Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.
0 votes
in vifm by

Hi there! Any way to tell vifm to use bat instead of cat for previews?
I'm aware you can config it to do so for certain filetypes with something like

fileviewer *.[ch],*.[ch]pp,*.[ch]xx bat %c -p

I'm looking for a way do config it's default behavior for all files (or rather, all files it normally previews with cat).

Loving the software by the way, cheers!

1 Answer

0 votes
Best answer


cat isn't used for preview, file is just read.

Use this after all other fileviewer commands to apply bat to all files:

fileviewer *[^/],.*[^/] bat %c -p

Oh that's embarrassing, I totally got that wrong -.-U

Well thanks a lot for the clarification and for the tip! ^^