Course Lessons
Free Trial: 5 lessons remaining
Unlock Full Access
Moving with Count Modifiers
Estimated time: 10 minutes
Task Instructions
Learn to combine numbers with movement commands for faster navigation
Practice using count modifiers with movement commands. Try 10j to move down 10 lines, 5k to move up 5 lines, 3w to move forward 3 words, and 15l to move 15 characters right. The pattern is [count][movement].
Learning objectives
- Understand count modifiers in Vim
- Practice combining numbers with h, j, k, l
- Learn to navigate quickly across multiple lines
- Master efficient multi-character movement
Required Keystrokes
This lesson requires you to use specific keystrokes to complete it. Your submission will be evaluated based on whether you used the required keystrokes mentioned below, rather than matching a specific output.
\d+j
Use count with j (e.g., 5j, 10j)
\d+k
Use count with k (e.g., 3k, 5k)
What This Means
- Your solution must include the required keystroke patterns
- The order of keystrokes may matter depending on the exercise
- You'll still need to achieve the expected output
- This helps you practice specific Vim techniques
Helpful commands:
Command | Description |
---|---|
[count]j | Move down [count] lines (e.g., 10j) |
[count]k | Move up [count] lines (e.g., 5k) |
[count]h | Move left [count] characters (e.g., 15h) |
[count]l | Move right [count] characters (e.g., 20l) |
[count]w | Move forward [count] words (e.g., 3w) |
Hints
- Type a number before any movement command to repeat it that many times
- 10j = move down 10 lines, 5k = move up 5 lines
- Works with any movement: 3w, 2b, 15l, 20h
Line 1: Start here and practice number-based movement
Line 2: The quick brown fox jumps over the lazy dog
Line 3: Vim allows you to move multiple lines at once
Line 4: Combine numbers with movement keys
Line 5: For example: 5j moves down 5 lines
Line 6: And 3k moves up 3 lines
Line 7: You can also use 10l to move 10 characters right
Line 8: Or 15h to move 15 characters left
Line 9: This makes navigation much faster
Line 10: Practice moving to this line from line 1 using 9j
Line 11: Then try moving back up using 10k
Line 12: You can combine counts with word movements too
Line 13: Try 3w to move forward 3 words
Line 14: Or 2b to move back 2 words
Line 15: Master these count modifiers for speed
Line 16: Navigation becomes effortless with practice
Line 17: Remember: [count][movement] is the pattern
Line 18: Like 5j, 10k, 3w, 2b, 15l, 20h
Line 19: Almost at the end now
Line 20: Great job practicing count modifiers!