is there a way to syntax highlight a file I see in Less?
actually I'm using this command to open an xml file (and sometimes a series of them)
less htmleditors/htmleditors_config.xml
or
less [multiple files]
I'd like to stay in Less (to learn that program better and to use my knowledge of :n and :p for next/previous navigation)
But it also want some kind of basic syntax highlighting – at least show the comments differently. Do you know any way to do it?
Best Answer
You can use GNU's source-highlight, as shown here (path may differ, see below):
As of Debian Stretch and Fedora 25, package names and script paths differ
Debian:
Fedora: