~
The
Command
The ~ command in Vim
Command
toggle case
Toggle the case of the character under cursor and advance. Use
g~{motion} to toggle case over a range, g~~ for the whole line, gU to uppercase, gu to lowercase.Examples
~5~g~~g~iw(toggle inner word)gUiw(uppercase word)guiw(lowercase word)
Reference
Learn every Vim command visually — right in your browser.
Add Vim What? to Chrome — FreeAlso on Firefox.
Related commands