Uppercase Commands

Many vim commands have an uppercase variation.

Hold Shift and the command does a bigger version of the same thing.

You already know i and a, which enter insert mode right around the cursor. Their uppercase variations reach all the way to the ends of the line.

Insert: i vs I

Both start insert mode, but I doesn't care where the cursor is. It always jumps to the start of the line.

i
-insert before the cursor
Example
I
i
-insert at the start of the line
Example

Append: a vs A

The same goes for a: lowercase appends just after the cursor, and A appends at the very end of the line.

a
-append after the cursor
Example
A
a
-append at the end of the line
Example

You'll See It Everywhere

As you learn more commands, look for their uppercase variations. A few you'll meet soon:

  • wnext wordWnext WORD, skipping punctuation
  • ddeleteDdelete to the end of the line
  • cchangeCchange to the end of the line

Not every uppercase key follows the rule. For example, O opens a new line above instead of below. But when you meet a capital letter, “a bigger version” is a great first guess.

Next, you'll put I and A to work in Insert at Line Ends.