Monday, November 12, 2007

Change the capitalization of text using Vim editor

To change the capitalization of characters in a word, line, paragraph, etc. using Vim editor do the following:
  1. select the text which you want to change (using v, ctrl-v or shift-v in the command mode)
  2. type ~
All uppercase characters is replaced with lowercase ones.
All lowercase characters is replaced with uppercase ones.

For example:
  • TREE becomes tree
  • Dog becomes dOG
  • fish becomes FISH
  • SomeStrangeText becomes sOMEsTRANGEtEXT

Enjoy using Vim!

No comments: