## 20090102

### Vim: Casing

Another not too often used but handy set of commands is changing the casing of letters. Here's the reference. Below are the commands of interest to me.

~ Toggles the current letter. An inconvenient keystroke but probably the one I end up using most. Perhaps I should remap it.
g~{motion} Toggles the case of the letters contained in the motion
g~~ Toggles the case of the letters on the line

U switches a letter to uppercase while u switches it to lowercase. U and u can be used in the same fashion as ~ was used above; ex: guu changes a line to lowercase.

g?? Changes the line to Rot13 and has been used in the past to obscure text. Doubt I will ever use this but interesting nonetheless.

Example
gggUG Will change the whole file to uppercase. Would be so much easier if ranges could be used; ex :%U.