Replies: 4 comments 1 reply
-
|
By default |
Beta Was this translation helpful? Give feedback.
-
|
Yes, bat supports basic vi-style navigation when it runs through less, so you can use keys like j, k, and search commands easily. It’s simple and efficient kind of like using a VIN generator, where everything just works smoothly without extra effort. |
Beta Was this translation helpful? Give feedback.
-
|
bat itself doesn't have interactive navigation — it's a pager-aware output tool, not an interactive viewer. For vi-style navigation with bat's syntax highlighting, the usual pattern is to use Option 1: bat + less with vi keys bat --paging=always --style=full myfile.pyThis opens less, which supports vi navigation keys by default:
Option 2: bat + most (more featureful pager) BAT_PAGER="most" bat myfile.py
Option 3: bat output into neovim/vim bat --color=always myfile.py | nvim -R -Opens in Neovim read-only mode with full vi navigation. The Option 4: delta (by the same community) For most use cases, |
Beta Was this translation helpful? Give feedback.
-
|
For oxlint --help 2>&1 | bat --paging=always --style=plain --language=help
vitest --help 2>&1 | bat --paging=always --style=plain --language=helpA couple of details matter here:
If you still see literal |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
like
lesswhen clickjwill go up in pagekdownBeta Was this translation helpful? Give feedback.
All reactions