in vim, with
gUw
make the word uppercase, with
guw
make the word lowercase.
how I can convert in one map the upper to lower and the lower to upper?
If you're trying to invert case, you can use ~
. Normally this works only on the selection (e.g. visual mode), but if you want it to be more useful, then :set tildeop
so you can do ~w
or whatever movement command you like.
You can use the tilde operator with global commands too: g~w
The advantage being, that you can then use the .
operator to repeat the operation :)
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