Drill 02: WORD Motions & Operators

Master the difference between w and W, combined with operators.

Practice Text

hello-world.example.com user@domain.org /etc/ssh/config
function(arg1, arg2) myVariable_name config["key"]

Drill Exercises

Exercise 1: Navigate with w vs W

Starting at beginning of each line: 1. Count w presses to reach end 2. Count W presses to reach end 3. Feel the difference

Exercise 2: Delete with dw vs dW

  1. dw on "hello-world" - observe what’s deleted

  2. dW on "hello-world" - observe what’s deleted

  3. d3w - delete 3 words

  4. d2W - delete 2 WORDs

Exercise 3: Change operations

  1. cW on an email address - change the whole thing

  2. ciw on a variable name - change just the word

  3. c2w - change 2 words

Exercise 4: Operator pending

Practice the grammar: 1. Press d, pause, then w 2. Press c, pause, then W 3. Press y, pause, then 2w

Self-Assessment

Skill Comfortable?

w vs W navigation

[ ] Yes [ ] Need practice

dw vs dW deletion

[ ] Yes [ ] Need practice

Counts with motions

[ ] Yes [ ] Need practice