When adding a prefix to a camel case variable, I usually need to Capitalize the (now second) word of the identifier. For example, when logGroup
becomes localLogGroup
, log
becomes Log
.
I am looking for a way to toggle the case of the current character (the one highlighted by the cursor) in vim.
The point is toggling the case without selecting the character - same way as x
deletes it. I simply want to toggle its case.
Any idea how to achieve this?
For changing case of character under cursor, you can use ~
. More at :help ~
.
~
can also be made as a operator when top
is set. More at :help top
.
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