Search and Replace in VIM

You can search and replace easily in VIM using this way

:%s/foo/bar/gc

Always have confirmation first, if you want to replace all, can choose ‘a’ after the search.

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.