How do I clear search highlighting in Vim?
:noh
The :noh (short for :nohlsearch) command clears the highlighting from the last search pattern.
:noh
The :noh (short for :nohlsearch) command clears the highlighting from the last search pattern.
:%s/pattern//gn
The :%s/pattern//gn command counts how many times a pattern appears in the file without making any changes.
:%s/old/new/g
The :%s/old/new/g command replaces all occurrences of old with new across every line in the file.