Pages

Oct 12, 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:
c
Confirm each substitution
g
Replace all occurrences in the line (without g - only first).
i
Ignore case for the pattern.
I
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

QuickBooks Self-Employed

Bigger tax refunds. Better organization. Manage your deductions with QuickBooks Self-Employed .