How to convert all text to lowercase in Vim
use this command mode option
ggguG
gg - Goto the first line
g - start to converting from current line
u - Convert into lower case for all characters
G - To end of the file.
If you really mean small caps, then no, that is not possible – just as it isn’t possible to convert text to bold or italic in any text editor (as opposed to word processor). If you want to convert text to lowercase, create a visual block and press
u
(orU
to convert to uppercase). Tilde (~
) in command mode reverses case of the character under the cursor.If you want to see all text in Vim in small caps, you might want to look at the
guifont
option, or type:set guifont=*
if your Vim flavour supports GUI font chooser.
I assume you want lowercase the text. Solution is pretty simple:
ggVGu
Explanation:
- gg - goes to first line of text
- V - turns on Visual selection, in line mode
- G - goes to end of file (at the moment you have whole text selected)
- u - lowercase selected area
Similar to mangledorf's solution, but shorter and layman friendly
:%s/.*/\L&/g