less is a terminal pager program on Unix, Windows, and Unix-like systems used to view (but not change) the contents of a text file one screen at a time.
To add syntax highlighting to less on linux, first install source-highlight, then copy the following snippet to your ~/.(bash|zsh|fish|etc)rc
file:
# The following adds syntax highlighting to various programming languages |
If you’re interested in reading about the differences between more, less and most, read Evan Teitelman‘s answer on StackExchange.
After reading more about less, I feel I’m just scratching the surface.
I love it that each day I learn how much I don’t know!