Copy all the lines to clipboard

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

    I couldn't copy files using the answers above but I have putty and I found a workaround on Quora.

    1. Change settings of your PuTTY session, go to logging and change it to "printable characters". Set the log file
    2. Do a cat of the respective file
    3. Go to the file you set in step #1 and you will have your content in the log file.

    Note: it copies all the printed characters of that session to the log file, so it will get big eventually. In that case, delete the log file and cat the target file so you get that particular file's content copied on your machine.

提交回复
热议问题