normal·mode
~ / text-objects / wordslesson 1/6

Words: iw, aw, iW and aW

Act on the whole word under the cursor, wherever the cursor is in it.

4 drills

  1. Change the word you are in: Replace the word the cursor is in. The cursor is in the middle of it, so cw alone would miss the start.
  2. Cut a word out of a sentence: Delete the word the cursor is in, along with one of the spaces around it, so no double space is left.
  3. Change a whole URL or path: Replace the whole URL, path or dotted name under the cursor, punctuation and all.
  4. Drop a command-line flag: Remove the flag the cursor is in, including the space next to it.

The drill editor loads in your browser.

outside the editor the page is in normal mode: ? keymaps · / find · : commandsfound this useful? ☕ support it ·credits · source · not affiliated with Vim or Neovim