googler wrote:
> I have one question related to the solution given there.
> :let i=1 | g/foo/s//\="blah_".i/ | let i=i+1

That is two commands:
    :let i=1
    :g/foo/s//\="blah_".i/ | let i=i+1

and the second of these is:
    :g/foo/
    :s//\="blah_".i/
    :let i=i+1

:g works by flagging each line containing the search pattern
('foo'). It then executes the Ex command that follows after the
':g/foo/' for each flagged line.

The s//.../ changes the first occurrence of 'foo' on the line,
then i is incremented. That is repeated for each flagged line.

John

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to