Omkar Manjunath
Omkar Manjunath

Reputation: 13

vim : Yanking doesn't work between file

I'm stuck up with a weird problem. I am trying to copy(yy) and paste(p) a line from one file to another (in split screen). It doesn't look it its working. However, yy, p works in the same file and with another file opened in another "tab". Would be really helpful if someone could tell me how to fix this. Spending a lot of time fixing this :(.

Thanks, Omkar

Upvotes: 0

Views: 2502

Answers (2)

lwassink
lwassink

Reputation: 1691

You could also use a named buffer. If you yank with "ayy and put with "ap you can yank and put from any buffer to any other buffer in your vim session. You can use any other letter instead of a as the name of the buffer.

Upvotes: 1

Omkar Manjunath
Omkar Manjunath

Reputation: 13

This worked: set clipboard=unnamed

Upvotes: 1

Related Questions