Syntax highlighting in less

If you want syntax highlighting in less, you can use source highlight software: http://www.gnu.org/software/src-highlite


In Debian bases systems, package name is source-highlight and you can start using just setting two environment values as below:

export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s"

export LESS=' -R '

 





I've been wanting this for years. Who knew it would be so easy? Thanks a million!
You must be login first or sign-up for an account to post comments.

Maybe you should look at these also: