Search And Replace In Neovim And Vim

Everywhere in the file


On the current line


Change on current line and next two lines (+2)


Change in each line starting with 'baz'.


In all open tabs

:tabdo %s/foo/bar/g  

Change only on specific lines


Change all lines from mark a to mark b inclusive.


Change from the current line (.) to the last line ($) inclusive.