Switching case on Vim

Jun 13, 2017

Uppercase

{Visual}U  - Make highlighted text uppercase.
gU{motion} - Make {motion} text uppercase.

Lowercase

{Visual}u  - Make highlighted text lowercase.
gu{motion} - Make {motion} text lowercase.

Toggle case

{Visual}~  - Switch case of highlighted text
g~{motion} - Switch case of {motion} text.

# Examples:

gUiw make a word uppercase (i:inner, w:word)
guiw make a word lowercase

References