0

Like the title says, if I have yanked some text, then select what I want to replace in visual mode, press p to paste, I want the original text still available to paste in other locations. I never want to paste the replaced text or have to remember to use registers in this case.

This is related to Clipboard is reset after first paste in Visual Mode but the solutions there don't apply to VS Code as far as I can tell.

How do you configure the VS Code vim plugin to do this?

3
  • Why do you need a solution that can't use a critical/primary feature of vim (registers)? If you can drop that restriction there's this: vi.stackexchange.com/questions/25259/… (You can create a mapping or macro so the register use happens transparently.)
    – B Layer
    Jan 12 at 0:58
  • Welcome to Vi and Vim! I’ve closed this as a duplicate. If you don’t find your answer in the linked post, please edit your question to clarify why it’s not a duplicate.
    – D. Ben Knoble
    Jan 12 at 1:22
  • To be clear: is the issue that VS Code (w/ vim plugin) doesn't have registers? Most of the solutions there involve the use of registers
    – D. Ben Knoble
    May 15 at 1:19