Copy all the lines to clipboard

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

    You can use a shortcur, like this one:

    noremap  :%y+
    

    It means, when you push F6 in normald mode, it will copy the whole file, and add it to the clipboard. Or you just can type in normal mode :%y+ and then push Enter.

提交回复
热议问题