Step 1 of 7

5. Visual Mode

What is visual mode?

Visual mode gives us a way of selecting text and operations on it. Think of “highlighting” in other editors — only more powerful.

To use visual mode, you’d do this:

  • move your cursor to where you want the start of your selection to be
  • mark the start of the text with the v key
  • move your cursor to where you want the end of your selection to be
  • perform an operation by typing an operator command

In visual mode, you use the navigation commands that you’re already familiar with to move around. And, as always, you can hit escape to re-enter normal mode.

The x key in visual mode will delete the selection. Work through the checklist below to clear the ? characters out of the editor.

  1. Enter visual mode Move the cursor onto a run of ? characters — the mode indicator will flip to VISUAL when you press v.
  2. Delete the selection Extend the selection over the ? characters with your navigation keys, then press x.
Enter visual mode Move the cursor onto a run of ? characters — the mode indicator will flip to VISUAL when you press v.

Next: Delete the selection

Loading editor…