Copy all the lines to clipboard

前端 未结 25 2308
礼貌的吻别
礼貌的吻别 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:38

    You should yank the text to the * or + registers:

    gg"*yG

    Explanation:

    • gg to get the cursor to the first character of the file
    • "*y to start a yank command to the register * from the first line, until...
    • G to go the end of the file

提交回复
热议问题