Remix.run Logo
mnkyprskbd 7 hours ago

bat is the king of pagers. https://github.com/sharkdp/bat

asibahi 6 hours ago | parent | next [-]

Doesn’t it just call `less`?

joombaga 4 hours ago | parent [-]

Yes. It calls the default pager (or whatever you specify).

teki_one 7 hours ago | parent | prev | next [-]

bat does not look like a pager: https://github.com/sharkdp/bat?tab=readme-ov-file#automatic-...

teo_zero 2 hours ago | parent [-]

In fact it's not. The name itself mimicks cat, not less. It's a filter that adds annotations to its input, such as syntax highlighting, git diffs and special-char coloring.

Personally I can't find any use for bat: I'm a devote user of vim for editing, and it already does all of this, so why not using it to view files as well? It's satisfying to have the same interface, colors and shortcuts whether you're editing or viewing!

saghm 6 hours ago | parent | prev [-]

I like it a lot more than `less`, but unfortunately it's always a lot slower when first opening really large files. I'm not sure if it's eagerly loading the whole thing (maybe because that's needed for AST parsing in the case of syntax highlighting, although it happens even on files without highlighting), but there are times I have to swap to `less` still.