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 http://unix.stackexchange.com/questions/38634/is-there-any-way-to-exit-less-without-clearing-the-screen – iyrin Jan 15 '15 at 02:52man man | vim -
to take advantage of my vim configuration, keys and functions – JJoao Jan 15 '15 at 08:45LESS_TERMCAP_so
variable causes the whole file to turn into orange background... – user1338062 May 23 '15 at 07:14