Saturday, April 25, 2020

Vim: Windows clipboard paste

Hi
 
I'm new to this group, so hope I get things right.
 
I have been in the habit of using right click to insert text from the clipboard. I am almost invariably in a DOS window.
 
It turns out that certain characters (some, maybe all) \x80-\x9f get translated on the fly to escape sequences. If the attempt is to input the clipboard material this fails at the first escape sequence.
 
It turns out that Vim has an alternative "*P which seems to work (delivering the codes with the high bit set rather than the escape sequences). The right click works in the GUI Vim.
 
I also built myself a getclip, which outputs the clipboard material to STDOUT, which can be piped or redirected.
 
regards – Chris Willis

No comments: