Uppercase the current word
gUiw
Example
Normal 0 / 2Operator pending 1 / 2Normal 2 / 2red blueCursor on line 1, column 2red blueCursor on line 1, column 2RED blueCursor on line 1, column 1Convert the inner word to uppercase.
Waiting for motion or text object
Convert the inner word to uppercase
Before & after
red blueCursor on line 1, column 2RED blueCursor on line 1, column 1Start in Normal mode. Cursor starts on e. Press gUiw; the highlighted after-cursor shows the verified final position.
Details & Vim help
Example replayed in Vim
Convert the inner word to uppercase.
gU is an uppercase operator. iw chooses the whole word even when the cursor is in its middle, and leaves surrounding whitespace alone.