wn8tqw
Last Updated: February 25, 2016
·
2.143K
· 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 "
Say Thanks
Respond

2 Responses
Add your response

3784

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

over 1 year ago ·
3785
Photo on 08.01.2013 at 04.15

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

over 1 year ago ·