by lillesvin · 7y ago · 0 comments
Vim can certainly do all these things (or mostly, I don't know about the terminal colors), but for viewing read-only text streams, it's a bit more domain-specific and convenient. It's also blazing fast to open, which vim isn't always.
Exactly. Drop-in compatibility with 'cat' is one of the goals of bat (see https://github.com/sharkdp/bat#project-goals-and-alternative... and a list of alternatives here: https://github.com/sharkdp/bat/blob/master/doc/alternatives....).
Another thing that I use frequently is previewing a whole set of files in a single (pager) output. Something like
bat src/*.cpp
This also allows you to easily search across a whole set of open files.