To my understanding man uses less
as a pager, and when searching for keywords using less
it "highlights" keywords with italics. I find that really inconvenient, so I'd like to change this to something like vim's set hlsearch
where the found pattern has a different background.
I attempted to run man -P vim systemd
but that quit with error status 1, so it looks like I'm stuck with less
.
There was nothing that I was able to find in man less
that helped (instead I found out that option -G
will turn off highlighting all together which is even worse than italics).
That being said does anyone know how to achieve search highlighting (change background color) in man pages?
FYI I run Ubuntu 14.10
I came across this question seems to ask about the same thing but I am not sure if I follow how does this work (LESS_TERMCAP_so
). The less
man page does not mention this. (I get strange results with this solution)
~/.bashrc
file.export LESS_TERMCAP_so=$'\E[30;43m'
See this answer as well unix.stackexchange.com/questions/38634/…man man | vim -
to take advantage of my vim configuration, keys and functionsLESS_TERMCAP_so
variable causes the whole file to turn into orange background...