Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Change case of selected characters in vi' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change case of selected characters in vi
Authored by: sayler on Jun 01, '04 12:03:32PM

For reference (I'm sure you know this) ~ is a bog-standard vi key for case-toggle.

Maybe there should be a "stuipid vi tricks" hint? :-)



[ Reply to This | # ]
vim extension
Authored by: zojas on Jun 01, '04 12:22:35PM

in vim, you can press the g key, then the ~ key, then ANY cursor movement (e.g., w, e, $, G, }, 2j, 'b, whatever) and all the text which the cursor would have moved over will have its case toggled. cool, huh?



[ Reply to This | # ]
vim extension
Authored by: thaigan on Jun 10, '04 01:39:41AM

A couple more useful ones:
3~ reverses case for three characters
g~~ reverses case for the whole line



[ Reply to This | # ]
vim extension
Authored by: thaigan on Jun 10, '04 01:42:28AM

I meant to mention these useful ones too:
guu lowercase line
gUU uppercase line



[ Reply to This | # ]