Search code examples
vimputtyyank

Yank text from VIM editor from one session to another session


I use Putty to connect to a server and I use 2 sessions, because I want to compare 2 .sh files and I find it easier to have both files on different windows.

I am using VIM as a text editor and want to yank a line from the file of the first session to the file of the second session.

I am using V"+y to yank and then p to paste, but it only works if I close the file in the current session and open the other file in the same session.

Is it even possible to yank text from one session and paste it in another?


Solution

  • It turned out that I had mouse mode enabled and when I turn it off I can simply Ctrl + C the needed section and add it to the other session. Didn't know the mouse mode makes such a difference.