Skip to content

Latest commit

 

History

History
4 lines (3 loc) · 366 Bytes

08-replace.md

File metadata and controls

4 lines (3 loc) · 366 Bytes

Replace

The :s command, or substitute, is used to replace characters in Vim. :s/abc/xyz to replace abc with xyz on the line the cursor is on. To replace instances of abc in the whole file, we can use :s%/abc/xyz. This will still only replace the next first instance of abc. :s%/abc/xyz/g will replace all of abc's occurances.