Mission 14 / 52• Basic Operators

Delete Words

The delete operator `d` combines with word motions `w`, `e`, and `b` to prune words effortlessly.

Delete word combinations

  • dwdelete from cursor to the start of the next word
  • dedelete from cursor to the end of the current word
  • dbdelete backward to the start of the previous word
1
const badTempOldValue = 42;
2
function runTask(task, unusedParam, callback) {
3
return callback();
4
}

Move your cursor to the start of `unusedParam` and press `dw`. It deletes the word and trailing space cleanly!

Now it's your turn!

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

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

Task 1: Remove obsolete and its trailing space with dw.

Expected result
// keep this
Show hint

Use dw from the start of obsolete.

1
// obsolete keep this
jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next