Somewhere in this file hides the word “hello”. Press / then type hel (that's enough to be unique), press Enter to jump to it, then delete the word with daw.
Searching beats scrolling every single time. When a file grows to thousands of lines, your eyes are the slowest tool you own. Type a slash, type a few letters, press Enter, and the cursor teleports across hello the file. Practice until reaching for search is a reflex.
Canonical solution: /hel Enter, then daw · target: 8 keystrokes — the fewest that solve it (every keypress counts).
/pattern searches forward, ?pattern searches backward. daw = delete a word — it grabs the word plus its surrounding space, so the sentence stays clean.
| Keys | What it does |
|---|---|
| /pattern | search forward |
| ?pattern | search backward |
| n / N | next / previous match |
| * | search for the word under the cursor |
| :noh | clear match highlighting |
Reading about keystrokes doesn't build keystrokes. Try this in a real vim buffer right now — the “Search and destroy” mission takes about a minute.
Sign in free to practice →