vim

To change all instances of one word to another within one line use:
:s/word/replacement/g

To change all instances of one word to another within the entire file use:
:%s/word/replacement/g

To ask for confirmation before replacing each instance of a word use:
:%s/word/replacement/gc

Post a Comment

You must be logged in to post a comment.