6 ms·
Not having smart copy is a complete dealbreaker to me https://github.com/alacritty/alacritty/issues/1919 https://github.com/alacritty/alacritty/issues/1919 Win
by francislavoie 6y ago
Not having smart copy is a complete dealbreaker to me https://github.com/alacritty/alacritty/issues/1919 https://github.com/alacritty/alacritty/issues/1919
Windows Terminal has smart copy by default now and the UX improvements of it are a huge difference. I use pantheon-terminal (i.e. the one from elementaryOS) on my linux environments, and the only reason is because it also has smart copy.
It means that on all the applications I use, Ctrl+C does _exactly_ what I expect, all the time. I don't want to have to context-switch when I go to a terminal and remember "oh yeah, I need to hold shift too" and accidentally kill the running process like a "tail -f" that I have running for logs on some server.
I understand it might be technically difficult to implement, but it means I can't switch to Alacritty without inevitable daily frustration.
- moonchild 6y agoYou can try mapping it to super+c/super+v, as macos does. (If apps you use don't support key rebinding, then a little xdotool|autohotkey|autokey magic can do it.)
- francislavoie 6y agoI don't use a mac though, and no, very no, thanks. I want my terminal to have the SAME hotkey as every other app on my system, not something different. And I'm not going to relearn Ctrl+C/V with a different hotkey globally. That's too crazy an ask.
- silon42 6y agoEvery decent app should support copy paste with ctrl+insert/shift+insert and doesn't conflict with terminal use of control characters... The alternative is to stop using terminal emulators.
- smabie 6y agoI mean, with Xorg, just select and middle click. Am I missing something?
- francislavoie 6y agoYes. It's not like every other app that exists on my system. Context switching is a nightmare. Stop shipping bad UX.
- moonchild 6y agoSelect+middleclick works with every app on your system.
- francislavoie 6y agoNo it doesn't, in a browser, middle-click will turn on drag to scroll, unless you click on a link in which case it will open a new tab. Which is something I use every day.
- moonchild 6y agoGrandparent said: > with Xorg The behaviour you describe only happens under windows.
- francislavoie 6y agoOkay you're right - but on Firefox on Linux which I just tried, middle click doesn't copy. It actually just does nothing.
- jrockway 6y agoI mean... it pastes, not copies. Selecting copies, middle clicking pastes. Someone has probably written a javascript widget that breaks it, but if it's a textarea or the URL bar, you can middle click to paste.
- francislavoie 6y agoSelecting most definitely does not copy. It would be horrendous if it did.
- deathanatos 6y agoFor Ctrl+C, I can see how the program can be made to differentiate between which one you want by whether something is highlighted. But how does it know what action to take on Ctrl+V?
- francislavoie 6y agoI've literally never used Ctrl+V for anything other than paste, so I'm honestly not sure how it's implemented on Windows Terminal or pantheon-terminal. But the way they have it, it always does what I expect. I'm also very much not a vi user because, for similar reasons, context switching is a nightmare. I use nano everywhere because it works almost exactly like everything else in my system (but honestly I should probably install micro everywhere).
- boring_twenties 6y agoCtrl+V is for quoting a control character. IOW: if you press Ctrl+D, it will cause EOF on the input stream. If you press Tab, it causes your shell to attempt to autocomplete. But if you press Ctrl+V Ctrl+D, or Ctrl+V Tab, it will insert ASCII code 0x04 or 0x09, respectively, into the input stream.
- pmoriarty 6y agoI use SHIFT-INSERT in Windows Terminal (and in Linux terminals too, actually, where it works great).
- francislavoie 6y agoThat requires using both hands and not only my left hand; if I'm scrolling around or clicking around, I'll have my right hand on my mouse. Ctrl+C/V is a one-handed hotkey and works in every other application. I'm not going to use a different hotkey for a single application. Like I've already said, context switching is a nightmare. I want the same basic hotkeys everywhere.
- pmoriarty 6y ago
- kitsunesoba 6y agoAs someone who spends most of his computing time under macOS, this by far is my most frequently encountered frustration under Linux. You get so used to ⌘-C and ⌘-V doing the same thing everywhere, terminal included, and when that's gone it's maddening.
- xxpor 6y agoCopy on select, who needs a keyboard ;)
- francislavoie 6y agoCopy on select is the bane of my existence. I use selection as a reading aid, to follow where I'm looking and to help me focus. I do this in the terminal all the time. If it clobbers my clipboard, this does _not_ help me.
- yjftsjthsd-h 6y agoThen don't use it? Selection doesn't overwrite the clipboard, unless your system is configured to do that specifically.
- Macha 6y agoTo elaborate, X11 has two clipboards by default: PRIMARY: Copy by select, paste with middle click or shift-insert. CLIPBOARD: Copy with explicit copy action, paste with explicit paste action (mostly ctrl-c/ctrl-v, except in terminals/vim) I'm not sure if this is carried over into Wayland. I've seen some Mac terminals offer copy on select and there it does clobber the clipboard, unlike on Linux. Vim exposes these as the * (PRIMARY) and " (CLIPBOARD) buffers
- pedrocr 6y agoWayland keeps the same behaviour
- fulafel 6y agoYou can also set interrupt to something else than ctrl-c, using stty.
- 1_player 6y agoThanks for letting me know about smart copy, I had to check which GTK terminals support it: - Tilix supports it, just set Ctrl-C/Ctrl-V as copy/paste and it'll intelligently handle it. - Kitty does as well, but needs to be configured manually to do so. - Terminator has a smart copy option enabled by default. - No support with default GNOME terminal.
- 1_player 6y agoEDIT: I stand corrected, GNOME terminal supports it as Tilix does: just set Ctrl-C/Ctrl-V as copy/paste. Perhaps this works with all VTE-based terminals?
- abrowne 6y agoI set alacritty to bind chars: "\x03" which is what Ctrl+C normally sends, to Ctrl+Shift+C, and copy to Ctrl+C. This is after getting used to the default behavior of VTE-based terminals (like GNOME Terminal), which set Ctrl+Shift+C to send Ctrl+C if you set copy to Ctrl+C. (Also "\x04" (Ctrl+D) to Ctrl+W, which will close things like python if it's running or the terminal if nothing is.)