Course Lessons
Free Trial: 4 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
Ready for Vim?
Before starting this lesson, be prepared.
Read the directions on the left, and when you're ready, let's go!