The "Vim from scratch" book is only $15 (-48%) right now!
Vim For Devs (Book) - 48% off

How to undo and redo a change in Vim

> 17 days ago

How to revert (undo) a change and how to revert the revert (redo) in Vim?

It's very simple.

  1. Make sure, you're in NORMAL mode by pressing Esc just in case.
  2. Press u to undo the last change. You can prepend it with a number, like 5u, to undo the five recent changes.
  3. Press CTRL-R to redo the change that was just reverted. Again, prepend it with a number to repeat the operation multiple times.

That's what you need to know to get going.

I hope that was helpful.

What's next?

Have a productive day!

Vim From Scratch Book

Learn Vim and boost your productivity to the next level.

Get The Book With 48% Off Learn More...