Mission 16 / 52• Basic Operators

Delete Lines

When an operator key is doubled (like `dd` or `yy`), it applies to the entire current line.

Capital `D` deletes from the cursor position to the line's end.

Line deletion

  • dddelete the entire current line
  • Ddelete from cursor to the end of the line (d$)
  • 2dddelete 2 consecutive lines starting from cursor
1
// Old debug logging - please remove
2
console.log("DEBUG: step 1");
3
console.log("DEBUG: step 2");
4
const finalResult = executeWorkflow();

Place cursor on a `console.log` line and press `dd`. The whole line vanishes and lines below shift up.

Now it's your turn!

0 / 4 tasks complete0.0s / 14s par0 / 10 par

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

Task 1: Delete both debug lines with counted line deletion 2dd.

Expected result
keep();
Show hint

Use 2dd.

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