Thursday, August 10, 2023

Re: Prevent copying of pasted-over text to register.

On 2023-08-10 03:37, DwigtArmyOfChampions wrote:
> I have some text in my register and I want to overwrite some
> existing text with the contents of the register. So I go into
> visual mode and highlight the text I want to replace, then I
> type P and the contents of the register get replaced. OK, but
> why is the replaced text now in my register? I want to continue
> pasting the same text at other spots in my document.

The typical way is to yank the text you want which puts it in the
"0 register, and you can then paste that over visual selections
explicitly with

"0p

which doesn't overwrite the "0 register, so you can do that multiple
times.

-tim





--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ZNTk8MpGwMxGB7Sl%40thechases.com.

No comments: