Mission 50 / 52• Visual Mode

Visual Line Mode

When operating on whole lines of code, character-wise visual mode is too granular.

Pressing capital `V` activates **visual line mode**, selecting whole lines from column 0 to end of line.

Visual line mode

  • Venter visual line mode (select whole lines)
  • j / kexpand visual line selection down or up
  • esccancel visual line mode
1
function first() {
2
return 1;
3
}
4
function second() {
5
return 2;
6
}

Press `V` on `function first()`, tap `j` two times to highlight the whole 3-line function, and press `d` to delete it cleanly.

Now it's your turn!

  1. Navigate to each green target across the code snippet.
  2. Use the motions and techniques learned in this lesson to land accurately on each target.
  3. See how fast you can complete 10 targets.
0/10
1
function first() {
2
return 1;
3
}
4
function second() {
5
return 2;
6
}
NORMAL
00:00