On Thu, Feb 18, 2016 at 10:48 AM, Christian Brabandt <cbli...@256bit.org>
wrote:

> ...
>
> I can't for the life of me find this now, but I think I have run into
> this same
> > problem before.  It really annoys me and someone (thought it was
> Christian)
> > pointed out there is an option to control this behaviour.
> >
> > Basically when you visually select text, and then paste over it, the
> visually
> > selected text (which was just replaced) is moved into the default
> register.  I
> > personally don't want the default register changed, as I want to continue
> > pasting it in other spots.
> >
> ...
> Hm, I think it is the 'a' flag in the guioptions possibly in combination
> with 'unnamedplus' value in the clipboard setting.
>
>
This also happens when using vim (instead of gvim) so it can't be any of
the guioptions.

So I was looking around through the help and found this reference which
explains it:

*put-Visual-mode* *v_p* *v_P*
When using a put command like |p| or |P| in Visual mode, Vim will try to
replace the selected text with the contents of the register.  Whether this
works well depends on the type of selection and the type of the text in the
register.  With blockwise selection it also depends on the size of the block
and whether the corners are on an existing character.  (Implementation
detail:
it actually works by first putting the register after the selection and then
deleting the selection.)
The previously selected text is put in the unnamed register.  If you want to
put the same text into a Visual selection several times you need to use
another register.  E.g., yank the text to copy, Visually select the text to
replace and use "0p .  You can repeat this as many times as you like, the
unnamed register will be changed each time.


So, if you want to continue pasting the original text you have to use "0p
(which works).

Thanks for the response Christian.

Dave

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui