On 12/05/09 21:50, smu johnson wrote:
> Hi,
>
> Ever been frustrated when you had some lines in your yank buffer from
> having "cut" some lines out of your code... wanted to paste it
> elsewhere... when you tidied up some whitespace by deleting some blank
> lines...
>
> .... only to find that what you had yanked before is no gone forever?
>
> I realize why this happens, and I'm wondering if this "smart" behaviour
> has been implemented already. If not, I'm willing to donate some money
> to some hungry kids.
>
> Thanks
Not sure if this answers your question, but:
- Register 0 (zero) remembers the latest _yank_ even if the
corresponding text isn't part of your editfile anymore;
- Registers 1 (one) to 9 (nine) remember the nine latest _delete_s, "1
being always the most recent of them, and "9 the least recent.
By using the ":reg[isters]" or ":di[splay]" ex-command, you can see what
these registers (or any other registers) hold at any given time, so you
can use e.g.
"0p
or
:.-1put 3
etc., to recover what is held in one of these registers (and, maybe,
nowhere else).
Registers " (double-quote), aka the "unnamed register" and register -
(dash), aka the "small delete register" can also be of use in some cases.
See
:help registers
and what comes after it.
Best regards,
Tony.
--
Glib's Fourth Law of Unreliability:
Investment in reliability will increase until it exceeds the
probable cost of errors, or until someone insists on getting some
useful work done.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---