How to copy from tmux running in putty to windows clipboard

前端 未结 5 582
难免孤独
难免孤独 2021-01-30 11:16

ENV: I am running tmux in putty, on a windows 7 laptop. I do ssh to linux systems while working.

I have to solve two glitches with tmux, before using it for all my needs.

5条回答
  •  被撕碎了的回忆
    2021-01-30 11:45

    PuTTY is just a terminal emulator; the Vim registers * and + are concerned about the X selection and clipboard; there's no overlap.

    PuTTY only allows you to copy the selected terminal contents to the Windows clipboard; when you run tmux, that will inevitably include the window layout.

    You need to switch from PuTTY to something that allows real integration, like the Cygwin XWin server, which is a real X Server that integrates the X clipboard with the Windows clipboard. Instead of inside the PuTTY session, you'd ssh -X into your server, and launch Vim in a Linux terminal, or GVIM directly. Then, yanking via "+y will work as you'd expect.

    Alternatively, if you want to keep using PuTTY, you'd have to use some workaround, like :writeing the selection to a local file, and transferring that to Windows via scp, for instance.

提交回复
热议问题