Oct 22, 2018

[HDGEM] vim Search & Replace

VIM search and replace command (S&R) :substitute.

Here is an excerpt from VIM help:

:range s[ubstitute]/pattern/string/cgiI
For each line in the range replace a match of the pattern with the string where:
Confirm each substitution
Replace all occurrences in the line (without g - only first).
Ignore case for the pattern.
Don't ignore case for the pattern.

Part of the command word enclosed in the "[" & "]" can be omitted.

See also:
vim Range of Operation, Line Addressing and Marks

Posted By Blogger to HDGEM at 1/20/2017 03:16:00 PM