vimputty

Vim select buffer to the clipboard via a PuTTY SSH connection


I connect to my server via SSH. How could I copy lines from visual mode straight to the clipboard?


Solution

  • You can select the register in witch you can copy anything. The list of available registers is available through :registers. The clipboard register is usually "*. Therefore if you want to copy anything in this register, just prefix the yank command by the register, i.e., "*y. The steps would be like:

    To make the copy work with PuTTY, you'll have to enable X-forwarding, vf Copy from PuTTY/Vim visual mode to Windows clipboard.