vimcopy-pastevicut

How can I copy and paste content from one file to another?


I am working with two files, and I need to copy a few lines from one file and paste them into another file. I know how to copy (yy) and paste (p) in the same file. But that doesn't work for different files. How is this done?

Also, is there a way to cut-paste?


Solution

  • Since you already know how to cut/yank text, here are a few ideas for pasting it back into another file: