Copy all the lines to clipboard

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

    Well, all of these approaches are interesting, however as lazy programmer I use yank all line by using combination of number + y

    for example you have source code file with total of 78 lines, you can do as below:

    1. gg to get cursor at first line
    2. insert 78 + y --> it yanks 78 lines below your cursor and current line

提交回复
热议问题