xxx <=> zzz
Original text:
xxxyyyzzz
Run command:
:s/???/???/
It becomes:
zzzyyyxxx
Run the same command above:
:s/???/???/
Back to the original text:
xxxyyyzzz
just like toggle case(~)
aBCdeFg
<=> AbcDEfG
Take a look at this: Can I substitute multiple items in a single regular expression in VIM or Perl?
Try this:
:s/(...)(yyy)(...)/\3\2\1/
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