Closed zakissimo closed 2 years ago
Nevermind, I used "-f" to force colors and it works. (a bit slow but looks nice)
*) bat -f "$file" ;;
Is there a way to make it fast ?
@zakissimo I use bat
for previews as well, and while it's noticeably slower to generate the preview than cat
, it's still fast enough for me. You could check whether bat
is the bottleneck in your setup or if there is some other configuration issue by running a few bat
commands manually in the terminal in order to get a feel for the startup latency of bat
vs cat
. That latency is, of course, the best you'll get out of your lf previews.
If you're working on an older or slower machine take note that bat
is orders of magnitude larger and more complex than cat
(ls -la /usr/bin/bat /usr/bin/cat
). This complexity comes at a price, which may be noticeable on lower-end machines.
Yes it's definitely my machine @slavistan . Thanks for your input and sorry for the inconvenience .
I'm trying to get the bat preview instead of cat for any text file. I changed the previewer file but the output is still the same.