> and I cannot find this behavior documented, and so I wonder if it's a bug.
> 
> If I visually select a block and hit "p" to paste from the unnamed 
> buffer, the block I'm overwriting gets put into the unnamed buffer. 
> There are two strange consequences of this:
> 
> 1. If I need to make several replacements down my file, I have to do a 
> new copy between each replacement (or use a new buffer).
> 
> 2. If I select the same block over and over again, hitting "p" will 
> toggle the block back and forth from its old state to its new state.
> 
> Is this the desired behavior? If so, shouldn't it be documented?


It's not so much a bug...the help on "v_p" mentions 
"Implementation detail:  it actually works by first putting the 
register after the selection and then deleting the selection."

The deletion is what's throwing you because it goes to the 
unnamed register.  You might try something like one of the
following:

   :vnoremap <f4> "_c<c-r>"
   :vnoremap <f4> <esc>Pgv"_d

which will do the deletion to the black-hole register.  The only 
catch is that you can't paste from a named register with these 
mappings.

-tim




--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to