How do I search and replace text only on the current line?
:s/old/new/g
The :s/old/new/g command replaces all occurrences of old with new on the current line only.
:s/old/new/g
The :s/old/new/g command replaces all occurrences of old with new on the current line only.
?pattern
The ?pattern command searches backward through the file for the given pattern, starting from the cursor position and wrapping around to the end of the file if n
: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.