Silviu
Silviu

Reputation: 103

vim select buffer to clipboard via putty ssh connection

I'm trying to wrap my head around this but so far I got no clue how to do it.

I connect to my server via ssh and I was wondering how I could copy lines from visual mode straight to the clipboard.

Upvotes: 1

Views: 707

Answers (1)

Raphael Pr
Raphael Pr

Reputation: 954

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

  • Enter visual mode (Shift-v for instance`)
  • Select your lines (mouvement)
  • Type "*y

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

Upvotes: 1

Related Questions