Drill 01: Insert Mode Controls

Practice the readline DNA: Ctrl-w, Ctrl-u, Ctrl-o, and Ctrl-r.

Drill Exercises

Exercise 1: Word Deletion

Enter insert mode and type:

The quick brown fox jumps over the lazy dog

Practice deleting words with Ctrl-w: 1. Delete "dog" 2. Delete "lazy" 3. Delete "the"

Exercise 2: Line Deletion

Enter insert mode and type:

This entire line will be deleted with Ctrl-u

Press Ctrl-u to delete to line start.

Exercise 3: Normal Mode Escape Hatch

In insert mode, practice Ctrl-o: 1. Ctrl-o w - move forward one word 2. Ctrl-o b - move backward one word 3. Ctrl-o $ - move to end of line 4. Ctrl-o D - delete to end of line

Exercise 4: Register Insertion

  1. Yank a word in normal mode: yiw

  2. Enter insert mode: i

  3. Insert the yanked text: Ctrl-r "

  4. Try the expression register: Ctrl-r =5*5<CR>

Self-Assessment

Skill Comfortable?

Ctrl-w word deletion

[ ] Yes [ ] Need practice

Ctrl-u line deletion

[ ] Yes [ ] Need practice

Ctrl-o normal mode escape

[ ] Yes [ ] Need practice

Ctrl-r register insertion

[ ] Yes [ ] Need practice