DEV Community 👩‍💻👨‍💻

Jonas Schumacher
Jonas Schumacher

Posted on

VIM Quick Tip: Convert Motion to Upper- or Lowercase

This is part of a series of posts that give you very small, quick tips on how to do things in VIM. This time: converting motions to upper- or lowercase. There are many ways to do this, but this is the one I'm using.

Suppose you have the following "word": screaming_snake

If you wanted to convert that to uppercase, move to the beginning of the word and type gUw from normal mode, where w is the word motion. This will give you SCREAMING_SNAKE. Now, if you hit guw, it will revert back to the original.

Top comments (0)

🌚 Life is too short to browse without dark mode