30.7 Using Buffers to Move or Copy Text
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
that vi
stores the last
nine (30.8
)
deletions in numbered buffers.
You can access any of these numbered buffers to restore any (or
all) of the last nine deletions.
(Small deletions, of only parts of lines, are not saved in
numbered buffers, however.)
Small deletions can be recovered only by using the 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 |
|