Friday, March 29, 2013

Re: Register overwritten only when clipboard=unnamed

Hello Gary,

I
figured out what's happening thanks to your reply.
Actually what I tried to do was to disable guioption_a. 
The manual says when guioption_a is on, the visually selected block is automatically 
yanked to * register - thus to unnamed too - upon exiting visual mode.

That why the previously yanked word is overwritten before 
the explicit 
paste actually happens during the
<
viwp> command
.
It's like there is one hidden yank between <w> and <p>.



On Fri, Mar 29, 2013 at 5:14 PM, Gary Johnson <garyjohn@spocom.com> wrote:
On 2013-03-28, PARK, Kyung-Kook wrote:
> I am not sure whether or not this is an obscure side effect which
> I can figure out. But when I set clipboard=unnamed, vip followed
> by yiw does not operate in the way I expected - actually nothing
> happens. It operates as expected I omit clipboard=unnamed from my
> vimrc. In a normal situation, it must yank a word from the current
> cursor position and paste it somewhere I want.

I think you want to retain the behavior of "autoselect" in
'clipboard', so rather than

    set clipboard=unnamed

try either

    set clipboard=unnamed,autoselect

or

    set clipboard^=unnamed

HTH,
Gary

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: