Vim: How to change the current item highlight color when substituting

I have changed my Vim colours so when I do a /search, every match is highlighted in bright yellow. This makes matches much easier to see.

However, when I perform a substitution with the confirm flag like :%s/find/replace/gc all the items are highlighted in yellow, which is fine, but I can't tell which item Vim is asking me to confirm.

How can I highlight the current substitution item in another colour so I can see what needs confirming?


The highlight group you want is "IncSearch" even if you don't have the the 'incsearch' option enabled—it is also used for the current substitution when confirmation is enabled.

See ":help hl-IncSearch".


When inside vim you can use the command mode:
:highlight IncSearch guibg=green ctermbg=green term=underline

To have it always, put this into your .vimrc:
highlight IncSearch guibg=green ctermbg=green term=underline