:%s/stringtofind/stringtoreplacewith/g
e.g.
:%s/Will/William/g
g is for replacing all occurrences
Commenting Multiple Lines in VIM Editor (credits to Bibin Wilson)
Follow the steps given below for commenting multiple using the terminal.
ESCctrl + v, this will enable the visual block mode.down arrow to select multiple lines that you want to comment.SHIFT + I to enable insert mode.# and it will add a comment to the first line. ESC and wait for a second, # will be added to all the lines.Uncommenting Multiple Lines
CTRL + V to enable visual block mode.x and it will uncomment all the selected lines at once.