Step 1 of 5

4. Basic Editing

Inserting text

Some might argue that inserting text doesn’t quality as an edit. I’d argue that it’s the most primitive edit there is! After all, what good is a text editor if we can’t use it to write stuff?

We’ve already learned how to insert text in a previous lesson, but let’s quickly recap:

  • use the i key to enter insert mode
  • type something
  • use the escape key to leave insert mode and re-enter normal mode

Let’s combine this with our new knowledge of Vim navigation to write our name at the specified place in the editor. Work through the checklist below.

  1. Move to the Name: line Any motion works — try 10G, or a few j presses.
  2. Enter insert mode The mode indicator will flip to INSERT — press i.
  3. Type your name, then return to normal mode Type your name after Name:, then hit Escape.
Move to the Name: line Any motion works — try 10G, or a few j presses.

Next: Enter insert mode

Loading editor…