Advantages over bat?
CarterLi opened this issue · 6 comments
I am a bat user and just found this. Should I switch?
You should try and see what you think! Since switching in either direction is super simple, Just Do It™.
That said, since bat
is a wrapper around less
, you actually have three options here:
- Use
moar
instead ofbat
- Tell
bat
to usemoar
as its pager (export PAGER=moar
orset -Ux PAGER moar
infish
) - Stay with
bat
If you ever search, you should probably go with 1 or 2 since search in less
is bad (IMO, that's why I started moar
in the first place).
If you're having problems with mouse scrolling you may want to go with 1 or 2 since it can sometimes be tricky to get right in less
.
If you switch entirely you'll probably see some differences in syntax highlighting, since moar
and bat
use different highlighters.
I'm rambling, was any of this helpful?
If you did try it, let me know your reactions!
Found a bug of syntax highlighting
Try #define TEST "//test"
moar
is using Chroma for syntax highlighting.
I found what I believe is this issue already reported, and added your test case there:
alecthomas/chroma#953 (comment)
The syntax highlighting of moar is really bad.
Why is the 1st and 3rd #include
are red but 2nd and 4th #include
are white?
bat:
https://github.com/fastfetch-cli/fastfetch/blob/dev/src/common/sysctl.h
I don't think I want to switch at this time. Thanks.
moar
is using Chroma for syntax highlighting.
Well I don't use Chroma. I use moar.
The sucky includes highlighting is fixed now in v1.25.4: