Copy all the lines to clipboard

前端 未结 25 2313
礼貌的吻别
礼貌的吻别 2020-11-28 16:54

Is there any way to copy all lines from open file to clipboard in VI editor. I tried yG but it\'s not using clipboard to store those lines.

So

25条回答
  •  抹茶落季
    2020-11-28 17:44

    I know ten years on this should be settled but the first two answers did not work for me so I kept digging. On a Redhat (remote server) - Windows 10 (local machine), if you cannot select the whole thing with a mouse, you are stuck because the usual copies do not work between the remote and the local machine clipboards.

    So, to copy on the remote Linux and to paste on the local Windows, specify the primary buffer with the * and do a nice double yank

    Use gg" * yy.

提交回复
热议问题