On Monday, September 10, 2012 8:22:33 AM UTC-5, Alexandre Provencio wrote:
> Hello guys,
> 
> 
> 
> I would like to know why Gvim is not replacing the selected text with
> 
> the contents of the register. This does not happen with regular Vim or
> 
> when cb=unnamedplus or cb=unnamed,unnamedplus.
> 
> 
> 
> What I'm doing is using the unnamed register with the usual 'y' and
> 
> 'p' not specifying it directly, and:
> 
> 1) yank a text
> 
> 2) visual select the text to be replaced
> 
> 3) put the text
> 
> 
> 
> As expected, the selected text goes to the unnamed register, but the
> 
> yanked text does not replace the selection which stays intact.
> 
> 
> 
> Vim 7.3-659, Ubuntu 12.04

Selecting text in Linux normally will automatically place the text in the 
selection clipboard or whatever it's called, so that you can paste it with a 
middle-click of your mouse. gvim by default also does this. So, to rephrase, 
you:

1. Yank text into * register
2. Visually select text, placing it in the * register (overriding what was 
there)
3. Paste the * register

Sounds like it's doing the "right thing" to me.

Check to see if "a" is in your guioptions setting. If present, selecting text 
in visual mode in gvim will automatically place it in the * register. It sounds 
like you don't actually want this, so if you've left guioptions at the default 
(or kept "a" if you've modified it) then I think removing the "a" should allow 
gvim to act as you like.

-- 
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

Reply via email to