Copy all the lines to clipboard

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

    Here's a map command to select all to the clipboard using CTRL+a:

    "
    " select all with control-a
    "
    nnoremap  ggmqvG"+y'q
    

    Add it to your .vimrc and you're good to go...

提交回复
热议问题