Copy all the lines to clipboard

前端 未结 25 2310
礼貌的吻别
礼貌的吻别 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条回答
  •  -上瘾入骨i
    2020-11-28 17:35

    On Ubuntu 12

    you might try to install the vim-gnome package:

    sudo apt-get install vim-gnome
    

    I tried it, because vim --version told me that it would have the flag xterm_clipboard disabled (indicated by - ), which is needed in order to use the clipboard functionality.

    -> installing the vim-gnome package on Ubuntu 12 also installed a console based version of vim, that has this option enabled (indicated by a + before the xterm_clipboard flag)

    On Arch Linux

    you may install vim-clipboard for the same reason.

    If you run neovim then you should install xclip (as explained by help clipboard-tool)

提交回复
热议问题