Last Updated: February 25, 2017
· nicolaslazartekaqui

Vim - Convert text to lowercase or uppercase


To convert all text to lowercase in vim do


or uppercase


look at the command ggVG is used to select all the text if you want you can select the text and use U or u to convert what was selected to uppercase or lowercase.

If you want use this function in search/replace, do this to lowercase (example)


or to uppercase (example)


Or if you want use this function in character, you can switch case doing this in character


1 Response
Add your response


Thanks for the information!
One small correction, to change to uppercase needs to find lowercase characters:

over 1 year ago ·