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)
2 comments:
This works with vim's (i)nner/(a)mbient gestures, so if your cursor is at "foob|ar" and you type gUiw, you will end up with "FOOB|AR".
Good stuff! Thanks for the tip.
Post a Comment