Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copying stuff from vim running in putty

Tags:

I am running Vim 6.3 through putty and putty connection manager. I have the mouse option set (set mouse = a). I am able to paste things from the (windows) clipboard to vim by but selecting text in vim isn't copying anything to the clipboard. Does anyone know how do I do this?

Note: I can't update Vim to a newer version.

like image 631
Pulkit Sinha Avatar asked Nov 30 '10 11:11

Pulkit Sinha


People also ask

Can you copy and paste from vim?

In vim command mode press v , this will switch you to VISUAL mode. Move the cursor around to select the text or lines you need to copy. Press y , this will copy the selected text to clipboard. Go to any external application and CMD + v to paste.

How do I copy and paste in PuTTY VI?

You can select text (suppose from a vi session) inside of a putty window (remember no CTRL-C requirewd here). Then go to your Windows program and hit the middle mouse button or 'Edit | paste' and the text will be pasted.

How do I copy and paste outside of Vim?

To copy text from outside applications into Vim editor, first copy the text using the usual Ctrl-C command then go to Vim editor and type "+p in Normal Mode. I find the above commands very tedious to type every time I copy-paste from outside Vim, so I mapped the Ctrl-y to copy and the Ctrl-p to paste in Vim.


1 Answers

Hold down shift, and then highlight the text you want to copy using the left mouse button. When you release, the highlighted text should be in the Windows clipboard.

like image 148
Matt Dunn Avatar answered Sep 17 '22 17:09

Matt Dunn