copying from VIM in a screen in putty under windows
Solution 1:
Yanking is a feature of Vim itself which by default only works for that process. If you want yanking to utilize the clipboard you have to use "*y (current selection) or "+y (real clipboard) as described in sections 04.7 and 09.3 of Vim help. Use the following commands in Vim to look this up:
:help 04.7
:help 09.3
PuTTY however has no access to either clipboard of the machine you're connecting to.
A quick workaround would be to use the cat command on the file, not in a screen session, and then select the text in your PuTTY which automatically copies it. Doing this outside a screen session ensures you can scroll up and get all of the text.
Solution 2:
Found this patch that will redirect print output (any text inside escape \e''[5i
and \e''[4i
) to the windows clipboard (e.g. to print "test" in bash echo -ne '\e''[5itest\e''[4i'
)
http://ericmason.net/putty/putty-0.60-clip.patch
if i can find a windows printer driver that sends text to clipboard instead of printing then putty can be used unmodified, just edit Terminal > Remote controlled printing > select your fake print driver
then i just need a macro to echo the escape codes and the buffer contents.