Find and Replace in Vim

Find and Replace in Vim

:s/from/to/g

Similar to sed

g does it globally, otherwise it only does the first match.

Leave a Reply

Your email address will not be published. Required fields are marked *