0

I have project1 and project2 being two separate project folders. I open them separately and simultaneously by typing code . in their respective folders.

In project1, suppose I yank a few lines from a file from within project1 with the intention of pasting this into another file within project2, the yank does not carry over to the other project. The pasting of the file in project2 is of the previous yank from inside project2.

Is there any clipboard/registers that are shared so that I can yank into these specific registers from project1 and then retrieve this register from within project2?

Tryer
  • 3,580
  • 1
  • 26
  • 49
  • This was answered at https://github.com/VSCodeVim/Vim/issues/6664 – Tryer May 27 '21 at 02:13
  • What was the answer? If it was worth having the question on SO, surely it is worth having an answer :) – sehe Jun 07 '21 at 14:26
  • Actually, I usually like to have the person that answers get the credit for it. Hence my link to github. I feel uncomfortable answering my own question as a full answer. I link to whoever / wherever someone answered as a comment. – Tryer Jun 07 '21 at 14:38
  • 1
    That's, however, not really how SO works. Self-[answers are encouraged](https://stackoverflow.com/help/self-answer) and the goal of the site is to accumulate Q&A entries. You're welcome to link to sources to credit them of course. Note that comments are not indexed by the site, and people may dismiss search results without answers out of hand. – sehe Jun 07 '21 at 14:51
  • @sehe okay. you win :-) – Tryer Jun 07 '21 at 15:04

1 Answers1

1

The answer to this was provided by the maintainer/developer of VSCodeVim here.

Essentially, usage of register * will serve the purpose. So, if one wants to yank from project 1, do thus:

"*yy (yank a line into register *)

Then, paste from this register in project 2

"*p

To make the * register the default, you can use the vim.useSystemClipboard setting.

sehe
  • 374,641
  • 47
  • 450
  • 633
Tryer
  • 3,580
  • 1
  • 26
  • 49