Cover by Kim Schulz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Registers and undo branching

You might know the feeling when you delete or cut something from your text, and realize later that you needed that text elsewhere. If you have already copied / cut another piece of text, then the old text is gone because the clipboard normally has room only for one piece of text—but not in Vim.

In Vim, you have two tools that can help when you modify your text and need to keep a track of deleted / copied text or changes to the text in general:

  • Registers: Registers is sort of an advanced clipboard with multiple buffers for storing your clippings, deleted, and copied text.
  • Undo branching: Undo branching is a simple form of version control built into Vim. It gives you the possibility to roll back the changes to a file ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required