I would like to emphasize that to achieve upper / lower case switching, it depends on what the exact cursor position is.
, if the cursor is now at the first character of the word,, you can use g~w :
g means you want to perform some operation in some area (while w definese is the exact area; ~ means you want to switch upper and lower case (you can substitute ~ with U / U , which means that you want to switch the word to uppercase / lowercase); w means that you want to make the case switch from the cursor to the end of the word;
, if the cursor is now in the middle of the word, and not at the very beginning , you can use g~iw :
iw means you want to do a random swith for the word the corsor is now in.
ZhaoGang Sep 23 '16 at 1:37 2016-09-23 01:37
source share