How do I convert selected text to uppercase?
Answer
U (in visual mode)
Explanation
In visual mode, pressing U converts all selected text to uppercase. This is a quick way to change the case of a selection.
How it works
- Select text with
v,V, or<C-v> - Press
Uto convert to uppercase - The selection is deselected after the conversion
Example
hello world
Select hello world with V, press U:
HELLO WORLD
Tips
uin visual mode converts to lowercase~in visual mode toggles the casegU{motion}uppercases without visual mode (e.g.,gUiw)gu{motion}lowercases without visual mode- Works with all visual mode types including block mode