One thing at a time all the time!

Welcome to Rocteur
Saturday, April 27 2024 @ 12:23 AM CEST

How to replace foo by bar unless the line contains xyz

To replace foo by bar unless the line contains xyz

:%v/xyz/s/foo/bar/g

see
:help :g
:help :v
:help :s


Best regards,
Tony Mechelynck

FAQ Manager » Vim » How to replace foo by bar unless the line contains xyz