In a vi
editing session, your last deletion
5dd delete 5 lines move somewhere else p put the 5 deleted lines back in a new location, below the current line
What fewer new users are aware of is
stores the last
vi also allows you to yank (copy) text to "named" buffers identified by letters. You can fill up to 26 (a-z) buffers with yanked text and restore that text with a put command at any time in your editing session. This is especially important if you want to transfer data between two files, because all buffers except named buffers are lost when you change files. See article 30.5 .
- from O'Reilly & Associates' Learning the vi Editor , Chapter 4