Copy and Paste Between GVIM Instances
vi, vim
Solution
I'd use system-wide buffer. Which is "+" in `vim`: `"+yy`, then in other instance `"+p`.
Edit: Explanation (kinda).
Double quotes followed by anything means "use named buffer instead of default one for the next copy or paste operation". `"+` means `use "+"` which is the system clipboard (and thanks to other answers here I now know about `*` which is handy too).
`yy` means "copy current line" - quite a lot of vim operations can be "doubled" like that to work on current line. `dd` deletes a line, `>>` indents a line etc.
Problem
I've been trying to find out how to copy and paste between instances of vim/gvim and haven't been able to find an answer. I have two different gvim windows open in Linux and I'm trying to copy and paste between those two. I know you can do this within tabs of one gvim window, but I have found nothing on two separate ones. I've attempted to yank it from one window and paste it into the other, copy it using `ctrl+shift+c` and similarly `ctrl+shift+v`, and using the mouse to copy and paste, but to no avail. Is there a way to do this?