5

I am a bit lost here on customizing the search/find highlight color or font format if you will. I understand that using LESS_TERMCAP_* we can alter the font format of less display. Full capabilities are here.

But I couldn't get how to change the search highlight! I want to add background color and change fore color to make them different from the standard output colors. Negating the standard output is preferred.

Also, one more question. A parameter with special characters (like @0), how can we write their LESS_TERMCAP_ variable?

It's getting really annoying not being able to even guess which one to use to change the colors! Thanks in advance for shedding some light on the matter.

  • 1
    It is LESS_TERMCAP_so. – jimmij Jan 9 '18 at 13:44
  • Working! Thanks. But how can I able to tell without asking every time I want to know which key to use? – joker Jan 9 '18 at 13:57
  • It is not well documented, you need to read sources, or just experiment a bit. There are only 4 capabilities supported in less: _so(standout), _mb(blinking), _md(bold) and _us(underline), so not much to experiment with. – jimmij Jan 9 '18 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.