On Fri 16-Feb-07 6:32am -0600, Bin Chen wrote:

> If I want to replace a to b, replace b to c, is it possible to do this
> two things in one line?

If you mean that all original a's should be b's and all
original b'c should be c's:

    :g/./s/b/c/g|s/a/b/g

will do both substitutes in a single pass.

OTOH, if you mean to replace all a's and b's with c's:

    :%s/a\|b/c/g

-- 
Best regards,
Bill

Reply via email to