How to make search highlights visible in Neovim when using URxvt
I don’t know why, but if you use the terminal emulator URxvt, the colour scheme Solarized and Neovim (or Vim) at the same time and then search for something, jump to the highlighted word, the cursor will then blend in a bit too much.
Here’s an example when I have searched for the number
3 and jumped to that search hit:
You can’t probably see it, but the colours are different! The colour on the normal text is
#839496 while the highlighted text is
#93a1a1. I was able to fix this and here’s how it looks for me right now:
This is the setting that fixes it:
hi search ctermfg=8 ctermbg=3 cterm=none
Adding that setting to my configuration for Neovim didn’t work though, for some reason my colour scheme changes it back, a workaround for me was to use an auto command for it:
autocmd colorscheme solarized highlight search ctermfg=8 ctermbg=3 cterm=none
A big thanks to “marcohinzgitter[” and “habamax” on the irc-channel #neovim at freenode.net for the helping me solving this long standing issue!