Is there a command in Vim that changes the case of the selected text?
+19
A:
Visual select the text, then U
for uppercase or u
for lowercase. To swap all casing in a visual selection, press ~
.
Without using a visual selection, gU<motion>
will make the characters in motion
uppercase, or use gu<motion>
for lowercase.
For more of these, see Section 3 in Vim's change.txt help file.
Mark Rushakoff
2010-05-31 21:34:24
up up-vote and away. +1 for you sir.
jeffjose
2010-06-01 20:07:04
+1
A:
See the following methods
~ :changes the lower case to upper case of current character
~guu :change current line from upper to lower. ~gUU :Change current LINE from lower to upper. ~guw :Change current WORD from upper to lower. ~gUw :Change current WORD from lower to upper. g~~ :Invert case to entire line
Refer the link: http://stackoverflow.com/questions/2573/vim-tutorials/2650815#2650815
ungalnanban
2010-06-03 12:48:37