Copy all the lines to clipboard

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

    If your fingers default to CTRL-A CTRL-C, then try the mappings from $VIMRUNTIME/mswin.vim.

    " CTRL-C and CTRL-Insert are Copy
    vnoremap  "+y
    
    " CTRL-A is Select all
    noremap  gggHG
    inoremap  gggHG
    cnoremap  gggHG
    onoremap  gggHG
    snoremap  gggHG
    xnoremap  ggVG
    

    I have them mapped to and .

提交回复
热议问题