Drill 01: Insert Mode Controls
Practice the readline DNA: Ctrl-w, Ctrl-u, Ctrl-o, and Ctrl-r.
Prerequisites
Complete Session 01: Insert Mode Controls first.
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
-
Yank a word in normal mode:
yiw -
Enter insert mode:
i -
Insert the yanked text:
Ctrl-r " -
Try the expression register:
Ctrl-r =5*5<CR>
Self-Assessment
| Skill | Comfortable? |
|---|---|
|
[ ] Yes [ ] Need practice |
|
[ ] Yes [ ] Need practice |
|
[ ] Yes [ ] Need practice |
|
[ ] Yes [ ] Need practice |