Showing posts with label lowercase. Show all posts
Showing posts with label lowercase. Show all posts

Thursday, August 28, 2008

Uppercase, Lowercse, Swapcase

In Vim, you can use the following motions to modify the case of an entity.


gum - lowercase text operated on by motion
gUm - uppercase text operated on by motion
g~m - switch case operated on by motion
~ - if notildeop is set (default), switch case under cursor
~ - if tildeop is set, switch case of {motion} text


Examples:


guw - lowercase current word
gU$ - uppercase to end of line
g~w - swapcase current word
v$~ - swapcase to end of line (if notildeop is set)
~w - swapcase of word (if tiildeop is set)