Search and replace text in Vim

Describe the basic fundamental uses of the text substitution inside the Vim editor. When you want a specific text(search) to be replaced with another text in the entire file, then you can use the following sequence:
(1) Replace with information:

:%s/search/replace/gc





(2) Without Confirmation:

:%s/search/replace/g

(3) Replace only in the line 1-10:

:1,10s/search/replace/g

Leave a Reply

Your email address will not be published.