When I search in, for example, man ls while in a tmux session, the search strings don’t appear highlighted – the page jumps down so that the search string is on the top line of the buffer, as expected, but it’s not highlighted.
Doing the same thing in the same shell while not in a tmux session results in highlighted search strings.
I have no idea where to start looking to solve this. Any hints are appreciated.
Fixed it. The problem is to do with the way that the
screen$TERMhandles italics. From thetmuxFAQ:This matches my problem exactly. The
$PAGERused bymanislessby default – basically,manuseslessto show the contents of the manual pages. In my case,lesswasn’t highlighting text, just showing regular text.The reason for this happening:
The solution is to make a new
terminfofile fortmux, which lets it know that italics are supported. The solution’s outlined in the (at time of writing) very, very bottom of thetmuxFAQ.After creating the new
terminfofile, intmux:C-b :source-file /absolute/path/to/.tmux.conf(from this SuperUser question) – this should maketmuxreload the.tmux.conffile. However, this didn’t work for me, and the changes only applied after restarting thetmuxserver (close alltmuxsessions, then re-open them).