Screen Too Small

This course material requires a larger screen to properly display the terminal and editor interfaces.

Please use a tablet, laptop, or desktop computer for the best learning experience.

You can continue browsing, but the experience will be significantly limited.

Practice Beginner 10 min

Basic Undo and Redo

Undo, Redo, and Vim's Time Machine

Task Instructions

Master the fundamental undo (u) and redo (Ctrl-r) commands

Practice making changes to the code, then use 'u' to undo them and 'Ctrl-r' to redo. Follow the TODO items to experience how Vim's undo system works.

Learning objectives

  • Master the fundamental undo (u) and redo (Ctrl-r) commands
  • Build confidence in experimenting with commands
  • Understand Vim's change grouping

Required keystrokes

Your submission is checked for these keystrokes, not just the final text — so reach for the technique, not a workaround.

  • u Use undo command
  • \<C-r\> Use redo command (Ctrl-r)

Helpful commands

u
Undo last change
Ctrl-r
Redo last undone change
3u
Undo 3 changes
Stuck? Peek at a hint 1 hint · try it on your own first
  • Remember: 'u' undoes the last change, 'Ctrl-r' redoes. You can press 'u' multiple times.

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

basic-undo-and-redo.txt

1" Read the task on the left.

2" A live Vim editor opens right here.

3" Finish the edits, then submit.

~

~

NORMAL 1,1   All

Ready to practice?

Take your time with the task — start whenever you're set.

Start Lesson