O'Reilly logo

Mastering Vim by Ruslan Osipov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Jumping into insert mode

You've already learned to enter insert mode using i, which puts you in insert mode at the position of the cursor.

There are a few more convenient shortcuts for entering insert mode:

  • a places you in insert mode after the cursor

  • A places you in insert mode at the end of the line (equivalent of $a)

  • I places you in insert mode at the beginning of the line, but after indentation (equivalent of _i)

  • o adds a new line below the cursor before entering insert mode
  • O adds a new line above the cursor before entering insert mode
  • gi places you in insert mode where you last exited it

You've also learned how to enter insert mode after deleting some code with the change command (c). Here are more ways to chain change commands: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required