@RussSharek Wait, but doesn't tilde *flip* the case of letters? So it doesn't replace gU and gu for anything that's mixed case, which is *most* of my usage for those.
Or am I missing something?
@RussSharek Wait, but doesn't tilde *flip* the case of letters? So it doesn't replace gU and gu for anything that's mixed case, which is *most* of my usage for those.
Or am I missing something?
You're right, it flips them. In my enthusiasm for a new (to me) tool I only focused on a simpler use case which I needed. I often need to capitalize an entire line, and letting ~ accept counts and motions was a win for me.
I see a few helpful friends chimed in with some other answers. I found this method, which could be mapped to keys:
Lowercase
:%s/pattern/\L&/
Uppercase
:%s/pattern/\U&/