Find and Replace Highlighting #212
-
Does anyone know how to specify a color to use for the current word of a find and replace command? For example, if I'm finding and replacing 'local' with 'test' in this file and confirming each one, how can I highlight the current 'local' that is waiting for confirmation? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
TLDR: try configuring the 👋 I did a little testing and I think this is what I'm seeing: If you're doing a search Example:
If you're doing a substitute without confirm enabled Example:
If you're doing a substitute with confirm enabled Example:
It was a little tricky to suss this out, but I think that's accurate. |
Beta Was this translation helpful? Give feedback.
TLDR: try configuring the
IncSearch
highlight group.👋 I did a little testing and I think this is what I'm seeing:
If you're doing a search
Example:
/local
IncSearch
highlight group controls the appearance of the next matchSearch
controls the remaining matches while typing, and all matches after you press enterIf you're doing a substitute without confirm enabled
Example:
%s/local/test/
Substitute
controls the appearance of both matches (while typing that part) and substitutions (while/after typing that part)If you're doing a substitute with confirm enabled
Example:
:s/local/test/gc
or:%s/local/test/c
Substitute
applies as above while you're ty…