next up previous
Next: 10.3 Editing Text Up: 10. Editing Previous: 10.1 Deleting Text

Subsections

10.2 Restoring Deleted Text

Whenever text is deleted with the any of the above commands it is stored in a ``delete buffer'' Any text stored in this buffer can be restored with the undelete command. The manner in which Ved uses its delete/undelete buffer may be different from other editors you have used-however, we have found it very useful in years of daily use.

Ved uses ten buffers for deletions10.1. These are arranged in a stack fashion so that you can restore up to ten separate deletions. If there is not enough free memory to store the deleted section of your file you will be asked if you wish to proceed with the deletion. Note that only ten delete buffers can be active at any time; when the eleventh deletion is done the first buffer is overwritten and the data currently in that buffer is permanently lost.

Please note that undelete does not necessarily restore the buffer to its original contents. It will if you do a delete/undelete without moving the cursor. But undelete does not track the position of deletes, so the restore will not always restore the buffer. It will always restore what you deleted ... but not necessarily in the ``correct'' location.

Block and position pointers are not saved in the delete buffers, nor are single characters deleted with the delete-character and backspace-delete keys.

10.2.1 Undelete [Escape U]

This command will cause the text currently in the last delete buffer to be restored at the current cursor position. If there are no active buffers the command will be ignored. After this command the number of active delete buffers is decremented. This means that the same data can only be undeleted once. Undelete pays no attention to the position the deletion was done at--which means that the command can be used to move a section of text by deleting it and then undeleting it later at a different position.


next up previous
Next: 10.3 Editing Text Up: 10. Editing Previous: 10.1 Deleting Text
2004-05-02