When I delete rows using dd the deleted text is put in the
default buffer, using dd again will put it in 1 and so on.

But if I use another kind of deletion like dw, I couldnt fetch
it from the buffers 1-9, only from the first "unnamed" buffer.

For future reference, these are "registers" rather than "buffers" (a different concept, and using precise terminology can help folks on the list in their replies)

From ":help quote_number"

        Numbered register 1 contains the text deleted
        by the most recent delete or change command,
        unless the command specified another register
        or the text is less than one line (the small
        delete register is used then).

The small-delete register is

        "-

holds deletions when they're smaller than a line (unless it was covered by the fairly lengthy list of exceptions covered in the "quote_number" help)

Why is this so and which kind of delete operations are
supported in the delete buffers?

I'm not sure why some things are arbitrarily chosen as "small" deletes, but any motion can be used with a delete. If you want to ensure that the deleted contents go into the trickle-down list of registers, you can prefix your deletion with an explicit register:

        "1dw

This will force a trickle-down of the current history of deletions for any such deletion. Odd things happen if you specify the middle of your history, such as

        "4dw

as it ends up in register #5 instead of #4 because of the nature of the trickle-down (or rather it gets put in #4, the trickle-down occurs and it also gets put in #1 so the formerly#4 is now in #5).

Just a few musings on the peculiarties of them. I don't usually use them unless I have previously used ":reg" to figure out which one I want...my memory isn't quite that good :)

HTH,

-tim



Reply via email to