Last Updated: February 25, 2016
· sheerun
Photo on 08.01.2013 at 04.15

Enable syntax highlight in less!

Install source-highlight package:

brew install source-highlight

And add following to your shell startup file:

export LESSOPEN="| src-hilite-lesspipe.sh %s"
export LESS=" -R "

2 Responses
Add your response


Thanks, very nice tip! but Less should be called with "-R" option to enable the color.

over 1 year ago ·
Photo on 08.01.2013 at 04.15

@0xnan Thank you for noticing this :) I've updated the protip.

over 1 year ago ·