Select all in vim through PuTTY

3

2

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?

pnongrata

Posted 2012-02-08T18:39:44.083

Reputation: 2 212

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 – 2012-02-08T18:47:55.483

1If you just want to open the file in a local editor, why not use WinSCP to grab it and open it that way? – FatalError – 2012-02-08T18:58:26.063

Answers

5

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

RedGrittyBrick

Posted 2012-02-08T18:39:44.083

Reputation: 70 632

0

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.)

http://www.vim.org/scripts/script.php?script_id=1075

lessthanideal

Posted 2012-02-08T18:39:44.083

Reputation: 670

0

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.)

birchy

Posted 2012-02-08T18:39:44.083

Reputation: 1