I have a file (LaTeX) that contains the lines that I want to comment on.
The regular expression that I use after visually selecting the appropriate block :s/^/%/gworks fine. However, vim then highlights each matching occurrence of the first part of the regular expression used in replace (highlights the first character at the beginning of each line).
The choice changes if I do another search or another search and replace, but I cannot decide how to turn it off without doing a βuselessβ search.
This is especially annoying if I'm looking for spaces (because having every " " highlighted in a text file is visually annoying).
How to deselect suitable rows after completing the search and replace?
source
share