Mission 48 / 52• Visual Mode

Visual Mode Operators

Once text is visually highlighted, the standard operators apply directly to your selection.

`d` deletes the selection, `c` changes it (enters insert mode), and `y` yanks (copies) it.

Operators on visual selection

  • ddelete the visually highlighted text
  • cchange highlighted text (delete and enter insert mode)
  • yyank (copy) the highlighted text to clipboard
1
const items = ["keep", "DELETE_ME", "keep_too"];

Highlight `"DELETE_ME"` with `v` and word motions, then press `d` to excise it.

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
const items = ["keep", "DELETE_ME", "keep_too"];
NORMAL
00:00