How To Switch The Case Of Characters In Vim
1
Select the text you’re interested in
Before changing case, you’ll need to select the text you’re interest in.
To do this, start on the first character you want to toggle, then enter visual mode by typing v. Use the directional keys (h, j, k, l) to select the rest of the text you want to change.
2
Toggle case
To toggle the case type g~.
3
All uppercase
If you want to make the text all uppercase use gU.
4
All lowercase
If you want to make the text all lowercase use gu.