On 06/30, Fabien Meghazi wrote:
> How can I delete a line or a bunch of selected line without loosing
> the yanked text in the clipboard ?
I assume you mean the unnamed register (:he quote_quote). This is where
all yanks and deletes go by default. Nothing gets put in the system
clipboard unless you specifically send it there by using the * register
in your command. (at least in my configuration.)
If you prefix the actual delete command with the blackhole register
(using a command like "_d), the current unnamed register contents won't be
disturbed. (see :help quote_).
Alternately, the numbered registers hold the 10 most recently yanked or
deleted things. This means if you yank something new, what was
previously in the unnamed register should now be in register 1.
Register 0 seems to be a synonym for the unnamed register. The one
caveat is that the numbered registers don't store some "small" yanks or
deletes. (see :help quote_number).
As another alternative, you could install David Fishburn's YankRing
plugin, which automatically gives you a history of all your yanks and
deletes, and provides commands for manipulating that history which are
more convenient that mucking around with numbered registers. (I have it
installed, but don't use it heavily.) Its url is