VIM: switch all text to lower case

You can change the case of a character by typing ~ , however, if you want to change all text to the same case (let us say lower case here), then you should enter the visual mode. Go to the line where you want to start. Here, we suppose we want to convert all text, so we go to the first line. You can type gg for instance. Then, type

    VGu
  • 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
Please follow and like us:
This entry was posted in Linux and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published.