On 20/02/09 18:31, Toby Bradshaw wrote: > Hi.. > > It's long annoyed me that cut and yank write to the same clipboard. It's > often that I'll yank something and then delete a few individual > characters near where I'm going to paste only to find the deleted > characters have obliterated what I yanked. > > Is there a way to to have only yank and delete copy to the default > register/clipboard and single character cuts go somewhere else > (/dev/null for all I care) ? > > Thanks in advance. >
- Register zero always contains the latest yank (regardless of any delete). - Registers 1 to 9 always contain the 9 latest deletes (1 = the very latest, 2 = the one before that, etc.) (all this regardless of any yank and, IIUC, of deletes to the black hole register, see below). - Register dash always contains the latest "small" delete (deleting less than one line with no specific register given in the delete command). If you want to avoid clobbering the so-called "unnamed" register (whose name is a double quote, ha ha) with one particular delete, you can always delete to the "black hole register" or register-underscore, which eats everything and never gives back anything (somewhat like /dev/null on Unix and the NUL device on Dos/Windows). To gvim, Edit=>Paste is a "put" from register plus, Edit=>Cut is a "delete" to register plus and Edit=>Copy is a "yank" to register plus (register plus being the system clipboard) so there is, and can be, _no_ distinction between "cut" and "delete". "Cut" does not belong to the Vim terminology; what the OS calls a "cut" is just, to Vim, one of the many possible variants of the "delete" operation. For details, see ":help registers". Best regards, Tony. -- It is easier to change the specification to fit the program than vice versa. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
