Copy all the lines to clipboard

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

    on Mac

    • copy selected part: visually select text(type v or V in normal mode) and type :w !pbcopy

    • copy the whole file :%w !pbcopy

    • past from the clipboard :r !pbpaste

提交回复
热议问题