Course Lessons
Free Trial: 5 lessons remaining
Unlock Full Access
Finding Text with Search
Estimated time: 10 minutes
Task Instructions
Learn search commands to quickly find text in files
Use '/' followed by 'treasure' to search for the word. Then use 'n' to go to the next occurrence and 'N' to go to the previous occurrence.
Learning objectives
- Learn to use / for forward search
- Understand n and N for search navigation
- Practice efficient text finding
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.
/
Use forward search at least once
n
Navigate to next search result
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 |
---|---|
/pattern | Search forward for pattern |
?pattern | Search backward for pattern |
n | Go to next search result |
N | Go to previous search result |
Hints
- Type /treasure and press Enter to search
- Use 'n' for next match, 'N' for previous match
Ready for Vim?
Before starting this lesson, be prepared.
Read the directions on the left, and when you're ready, let's go!