Course
Practice
Beginner
10 min
The Great Refactor
The Great Refactor: Mastery in Motion
Task Instructions
Apply all your Vim skills to refactor messy legacy code
This is a comprehensive challenge that requires you to use undo, visual mode, and text objects together to clean up legacy code. Take your time, experiment, and use undo when needed.
Learning objectives
- Combine all learned techniques in realistic scenarios
- Practice strategic use of undo during complex edits
- Apply text objects and visual mode together
- Develop professional Vim workflows
Required keystrokes
Your submission is checked for these keystrokes, not just the final text — so reach for the technique, not a workaround.
- [cd]i[w"'()] Use text objects for editing
- u Use undo for safety
Helpful commands
- ciw
- Change inner word
- ci(
- Change inside parentheses
- V
- Visual line mode
- u
- Undo mistakes
- .
- Repeat last change
Stuck? Peek at a hint 4 hints · try it on your own first
- Use ciw to change class/method/variable names
- Use u to undo if you make a mistake
- Use . to repeat similar changes
- Visual mode can help select complex names
Premium Course
This is a premium course available exclusively to paid members.
Upgrade your membership to access this course and all premium content on the platform.
Upgrade to Premium
Access all premium courses
Unlimited lesson submissions
Track your progress
" Read the task on the left.
" A live Vim editor opens right here.
" Finish the edits, then submit.
~
~
NORMAL