Copy and paste content from one file to another file in vi

后端 未结 18 1484
南方客
南方客 2020-12-04 05:02

I am working with two files, and I need to copy a few lines from one file and paste into another file. I know how to copy (yy) and paste (p) in the same file. But that doesn

18条回答
  •  情歌与酒
    2020-12-04 05:02

    Use the variations of d like dd to cut.

    To write a range of lines to another file you can use:

    :, w filename
    

    Where and are numbers (or symbols) that designate a range of lines.

    For using the desktop clipboard, take a look at the +g commands.

提交回复
热议问题