Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm PuTTYing into a Linux machine from a Windows computer. I'm opening up a large log file in vim and am having enormous difficulty trying to figure out how to select all the text and copy it into a clipboard that PuTTY can access. Then I can paste it into an editor back on my Windows machine.

All the tutorials I found on this do not work for me, I suspect, because I am using PuTTY as the "middle man". And thus, PuTTY is not able to transfer from the Linux clipboard to my Windows clipboard, etc.

How do I do this?

share|improve this question
I'm not a Windows user so i don't know PuTTY but, if you can't find a setting somewhere in PuTTY to allow some kind of "clipboard sharing", the best thing to do would be to scp the log file to your local machine. or use Vim on the remote machine as it's certainly more powerful than whatever editor you are using locally. – romainl Feb 8 '12 at 18:47
If you just want to open the file in a local editor, why not use WinSCP to grab it and open it that way? – FatalError Feb 8 '12 at 18:58
up vote 5 down vote accepted

You can't access any of vim's cut-buffers fom Putty.

Putty can cut marked text from it's scrollable screen buffer but that doesn't do what you want when you need to select more lines than can be viewed in the Putty window because vim doesn't populate the scroll-buffer of Putty because it uses curses escape codes to redraw pages.

Putty comes with an SCP client pscp you can use to transfer the log file to a PC

share|improve this answer

Depending on what you want to do, you might find the netrw plugin useful.

Essentially in this case you could use vim on your Windows machine to edit the files on the Linux machine. (You'd still use putty/pscp or something similar to copy the file about, but automatically behind the scenes.)

share|improve this answer

I was able to select the text in chunks and paste them into Notepad, using vi remotely in PuTTY on a windows machine. Not a complete solution, but it worked for me. (File was only three screens long.)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .