Mission 52 / 52• Visual Mode

Visual Line Operators

Operating on multiline blocks in visual line mode: select the lines with `V`, then press `d` to cut or `y` to copy, followed by `p` to paste.

Visual line operations

  • ddelete all selected lines
  • yyank (copy) all selected lines
  • cchange selected lines
1
// Block to duplicate
2
const serviceA = initializeService("A");
3
serviceA.connect();

Select the two service lines with `V` and `j`, press `y` to yank, move down and press `p` to duplicate the block!

Now it's your turn!

0 / 3 tasks complete0.0s / 15s par0 / 20 par

Practice this lesson's commands. Each task checks your technique and the result, not just your cursor position. Take your time.

Task 1: Select the two debug lines and replace with ready(); using c. Return to normal mode.

Expected result
ready();
keep();
Show hint

Press V, j, c, type ready();, then Escape.

1
debugOne();
2
debugTwo();
3
keep();
jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next