1

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.

Raphael Pr
  • 896
  • 10
  • 28
Silviu
  • 103
  • 1
  • 10

1 Answers1

1

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

Community
  • 1
  • 1
Raphael Pr
  • 896
  • 10
  • 28