Wednesday, May 4, 2011

Re: Can you override the deletion register when pasting from visual mode?

Andrew Neil, Wed 2011-05-04 @ 16:35:45+0300:
> Is there any way to prevent the default register from being clobbered
> when using the paste command in visual mode?
>
> By default, when you use the `p` or `P` commands in visual mode, the
> selected text overwrites the default register. Is there any way that
> you can instruct Vim to write that text to another register?
>
> Thanks in advance,
> Drew
>
> --
> 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

It's not exactly what you asked for, but keep in mind that the "0"
register always contains the most recently yanked text. So if you're
yanking from somewhere and then pasting what you yanked over a visual
selection, then the default register will indeed be clobbered, but
register "0" will still contain what you had yanked previously.

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

No comments: