Switch character case under cursor in vim

When adding a prefix to the camel case variable, I usually need to smooth out the (now second) identifier word. For example, when logGroup becomes localLogGroup , log becomes log .

I am looking for a way to switch the case of the current character (highlighted by the cursor) to vim.

A dot toggles a case without selecting a character - just as x deletes it. I just want to switch his case.

Any idea how to achieve this?

+5
source share
1 answer

To change the case of characters under the cursor, you can use ~ . More at :help ~ .

~ can also be executed as an operator when top set. More at :help top .

+9
source

Source: https://habr.com/ru/post/1269895/


All Articles