Step 3 of 6

Changing a selection

Changing a selection

Often you don’t just want to delete text — you want something else in its place. That’s what c does: it deletes the selection and drops you into insert mode so you can type the replacement.

To change something:

  • make a selection
  • press c
  • type the new text
  • hit Escape to return to normal mode

e is a good motion to pair with c. Where w selects through the space after a word, e stops at the word’s last letter, so the space survives and your replacement slots neatly into the sentence.

e selects from wherever the cursor is, so it only grabs the whole word when the cursor sits on the first letter. If it is on a space or in the middle of a word — which is where w and Escape tend to leave it — press b first to back up to the start of the word, then e.

Work through the checklist below, and keep an eye on the statusline as you go.

  1. Select the word Quick with e The cursor starts on it — press e to select to the end of the word.
  2. Change the selection with c The word disappears and the statusline flips to INS when you press c.
  3. Type a replacement, then return to normal mode Type a new word, then hit Escape.
  4. Change another word the same way Press w to reach the next word, b to land on its first letter, e to select it, then c.
  5. Type the replacement, then return to normal mode Finish the new word, then hit Escape.
Select the word Quick with e The cursor starts on it — press e to select to the end of the word.

Next: Change the selection with c

Loading editor…