I want to replace word
with WORD
, but only on the lines which start with -
. Anybody knows how to do it?
:%g/^-/s/word/WORD/g
it's just a normal search and replace, but using g// to filter the lines you want to run it on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With