Last Updated: June 24, 2016
·
225
· ryrych

Forget about Caps Lock and use gU in Vim

<kbd>Caps Lock</kbd> is a key that you can forget nowdays. In Vim you’d better of remapping it to <kbd>Ctrl</kbd> and make use of <kbd>gU</kbd>. When you press:

  • <kbd>gu</kbd>,
  • <kbd>gU</kbd>, or
  • <kbd>g~</kbd>

Vim waits movement. Examples:

marks cursor position.

Before

L▓rem

<kbd>guiw</kbd>

After

lorem

Before

l▓rem ipsum

<kbd>gUil</kbd>

After

LOREM IPSUM

Before

▓OREM ipsum

<kbd>g~$</kbd>

After

lorem IPSUM