3 ms·
Selection copy and middle-click paste is both good and bad. As a highlight-reader, I don't like automatic copy on selection. It's too easy to clobber the selec
by barrkel 13y ago
Selection copy and middle-click paste is both good and bad.
As a highlight-reader, I don't like automatic copy on selection. It's too easy to clobber the selection clipboard. It also affect usability on basic things like copying something from the terminal to paste into a browser's search box. Naturally, you want to delete the existing contents of the search box, but selecting it all to delete it clobbers the very thing you want to paste.
The setup I have on Windows with Cygwin and mintty is my preference. There is only one clipboard, and normal GUI selections don't have any affect on it. However, selection in the terminal copies into the clipboard, and middle-click in the terminal pastes the clipboard. Combine that with keyboard shortcuts for pasting the clipboard in the terminal, and a couple of command-line scripts (I call mine 'c' and 'p') for using copy and paste with pipes, and everything works pretty smoothly.
As it is on Linux, my 'c' reads stdin and stuffs it into both primary and clipboard buffers, while my 'p' takes an argument 's' to print out the primary buffer, otherwise it prints out the clipboard buffer. It's a pain when you end up pasting the wrong thing. Meanwhile, middle-click in UI apps is very rarely used because (a) it requires too much precision in aim - the text usually ends up exactly where you middle-click, rather than the current position of the cursor - and (b), I usually want paste to replace a selection, but the act of selection clobbers what I'm trying to paste...