The "small delete" register automatically stores content that is deleted, as long as it meets the following conditions:
-
the length of the content must be less than one line, and
-
the deleted text must not have been directed to one of the named registers or the black-hole register.
If these conditions are true, then you can access the most-recently deleted text using this register. Like the numbered registers, the conditional behavior of this register can make using it somewhat less reliable that it might otherwise be, but it can be a helpful tool in some cases.
Lets look at a simple example. Starting from the following buffer
we first use v to enter visual mode, move the cursor forward by two words using 2w, then finally delete the selected text using d. That produces the following buffer content:
If we check the register contents, we can see that the deleted text has been copied into the unnamed register and also into "-, which is the name used to access the content in the small-delete register.
Finally, we can paste the content from the small-delete register back into the document using "-P
which returns the buffer to the original content.