5 ms·
Work had me using the Windows Terminal for the first time ever after a life of developing on Linux. I got immediately hooked on the smart Ctrl+C and Ctrl+V (wit
by j1elo 1y ago
Work had me using the Windows Terminal for the first time ever after a life of developing on Linux. I got immediately hooked on the smart Ctrl+C and Ctrl+V (without needing to use Shift like on Linux!)
For those not knowing, Windows Terminal uses Ctrl+C to abort the current process (as we'd expect) when nothing is selected, but copies when there is a selection. Similarly, Ctrl+V just pastes. So convenient!
- stefanha 1y agoIn Linux (Wayland) you can copy text from the terminal without pressing Ctrl+C at all. Just select the text. To paste it in another Window, press the middle mouse button. This is called the Primary Selection and is separate from the Clipboard (Ctrl+C/Ctrl+V). IMO the Primary Selection is more convenient than the Clipboard.
- j1elo 1y agoYeah I know. I missed this for the first couple days, but didn't take much before forgetting it after the change to Windows. (anyway I keep using Linux at home)
- DaSHacka 11mo agoIsn't this an X11-ism? I dont believe this is Wayland-specific
- lelandbatey 11mo agoThis is also a thing in X, not only Wayland.
- pmontra 11mo agoThat's an X11 thing that Wayland had to reimplement because it's so convenient. The problem is when pasting into the terminal something that another program copied into the clipboard. That's ctrl-shift-c. I thought about remapping copy and paste to their own keys, possibly a single one. Maybe on the number pad, which I never use. Or remapping ctrl-c.
- tmtvl 11mo agoThere's always Ctrl+Insert for copy and Shift+Insert for paste. I know that there's some laptops lacking an insert key, which is terrible, but for keyboard with an insert key the Ctrl/Shift + Insert combos are useful at times.
- pmontra 11mo agoEspecially because one does not have to push three keys with the same hand, which is not nice to tendons. I think I did that for a while time ago, then forgot about it. Thanks.
- tmtvl 11mo agoI always use the opposite modifier key(s) (e.g. right control + a), which I was told to do when I learned to type Dvorak; but you're welcome.
- bluebarbet 11mo ago>middle mouse button Speaking for myself (although I suspect many others), I haven't used a mouse in well over a decade. To be clear, I am in the terminal all the time. So this is not a universal solution.
- dzaima 11mo agoBut that doesn't go into clipboard history. And severely restricts what you can do between copying and pasting in general (very importantly makes it a pain to do replace (i.e. select+(implicit-delete+)paste)) as any intermediate selection before pasting destroys your Primary Selection. And if you realize you did that, recopying takes manually reselecting the text, or the otherwise-never-used ctrl+insert to recopy, instead of just repeating the same old ctrl+c as you always do with the clipboard in any sane application. Of course still a nice option (esp. in terminals where the proper copy/paste are nerfed and selecting for editing is annoyingly not a thing), but far from a replacement for the proper clipboard.
- bytehowl 11mo agoHow do you paste the selected text if you want to replace a text selection in the other window?
- cosmic_cheese 1y agoMac terminals yield a similar benefit, with the systemwide copy/paste Cmd+C/V not overlapping with Ctrl+C/V. Being used to that, Linux terminals become rather annoying. Yes there's other ways under Linux, but they don't have 25+ years of muscle memory associated with them, and so when the key shortcuts don't work as expected it's like nails on a chalkboard.
- jack_pp 1y agoHeh, shortcut muscle memory is the reason I returned my Mac mini one week after trying it. I sure am not gonna remap my brain for apple after 20 years of Linux and windows.
- computably 11mo agoIt's easy and reasonably quick to set up key remapping (via Karabiner).
- taftster 11mo agoYes, but specifically in the context of Terminals (as discussed in the original article), it's really convenient to be able send Ctrl-C (break) differently than Cmd-C (copy). So yes keyboard remapping is an option. But there's just differences you can't remap because of the extra meta keys on Mac (and I guess on Windows too, with the Copilot or Start keys in play).
- inejge 11mo ago> it's really convenient to be able send Ctrl-C (break) differently than Cmd-C (copy) Right, and even on Linux you can do it by using the four-fifths forgotten CUA shortcut Ctrl-Insert for copy (and Shift-Insert for paste.) Although I'll admit to using Ctrl-Shift-C/V most of the time.
- Ghoelian 11mo agoMy keyboard doesn't even have an insert key.
- jwnin 1y agowindows terminal is awesome and i wish it shipped with windows by default instead of having to go to the store and install it. everyone who uses it has only good things to say, and it is updated regularly by Microsoft.
- Iwan-Zotow 11mo agoIt is default in w11 25h2
- DHowett 11mo agoIt comes with Windows, and has since 2022! Alas, if you mean Windows 10 then you can use some DISM magic to add it to an install image.
- zadjii 11mo agoIt's shipped with Windows since Windows 11. Updates come via the Store (since that's a lot faster than OS updates), but it's definitely preinstalled these days
- ajross 1y ago> I got immediately hooked on the smart Ctrl+C and Ctrl+V (without needing to use Shift like on Linux!) You, uh, never tried middle clicking?
- nitinreddy88 11mo agoSo now we are moving away from Keyboard only Vim/Terminal thing to mouse for pasting?
- ajross 11mo agoYou can cut/paste within your editor just fine. The subject at hand is window-system level clipboard/selection interaction, and in particular the presence of standard key bindings for them in various environments. While some terminal and editor apps do have keyboard bindings that interact with the OS clipboard, none are standard. Basically, yeah: you had to use the mouse to select it in the first place. Using the mouse to paste it is easier, not harder.
- pmontra 11mo agoYeah, that slows down typing a lot. Luckily people on a laptop can use the touchpad which lies just below the space bar. I have a laptop with physical keys around the touchpad so I even have a button to paste. No need to tap, double tap, etc. I think that I never used a mouse in the last 20 years.
- officeplant 11mo agoI can hit the middle click for my Trackpoint without leaving the keyboard :3
- ghosty141 11mo agoI mean ctrl+c/v is just muscle memory, obviously there are tons of other way but ctrl+c/v are just the default and the one everyone knows.
- ajross 11mo ago
- h3x4d3c4 11mo agoNot sure if this was available from the beginning, but Ghostty has the ability to do exactly that with what they call "performable" keybindings <https://ghostty.org/docs/config/keybind#performable: https://ghostty.org/docs/config/keybind#performable:>
- mongol 11mo agoThis is genious. It is one of the most annoying things remaining in the Linux desktop and I often press Shift-Ctrl-C in the browser by mistake, opening up the dev tools in the process, while intending to copy. Are there any legitimate reasons to send Ctrl-C except to abort, that this could interfer with?
- thayne 11mo agoFWIW, in zsh, and probably other terminals, you can bind ctrl+v to be paste. Many terminal emulators also allow you to bind ctrl+v to paste, although that may interfere with applications that use ctrl-v for something else. Kitty has a copy_or_interrupt action that behaves like you describe. Although, I think it would interfere with apps where ctrl-c is handled specially. Edit: kitty also has a copy_or_noop action that passes through the ctrl+c if there is no selection.
- Yizahi 11mo agoI really wish PC manufacturers didn't kill Insert button. It worked just fine for decades with Ctrl-Ins/Shift-Ins, and in every terminal I've tried. But now the button is missing more and more often (thanks HP, I appreciate useless call and share buttons in its place, which don't work anywhere), and fixes need to be invented for a solved problem.
- indigodaddy 11mo agoYeah shift-ins really is the way
- teo_zero 11mo agoIt doesn't look so convenient to me. If Ctrl+v is bound to paste, how do you insert a verbatim character in the shell? How do you start a block visual selection in Vim? How do you scroll down in emacs?
- blueflow 11mo agoYou don't but you don't notice if you never did anything like that. Half of the keybinds listed by 'stty -a' are a mystery to mankind.
- tom_ 11mo agoYou can unbind the Ctrl+V keymapping if you want, and it behaves as expected in emacs -nw at least. (There's a Ctrl+Shift+V binding set up by default, same as many Unix terminal emulators, so you won't miss out.)
- throw0101c 11mo ago> If Ctrl+v is bound to paste, how do you insert a verbatim character in the shell? For those unaware: > Unix interactive terminals use Control-V to mean "the next character should be treated literally" (the mnemonic here is "V is for verbatim"). This allows a user to insert a literal Control-C or Control-H or similar control characters that would otherwise be handled by the terminal. This behavior was copied by text editors like vi and Unix shells like bash and tcsh, which offer text editing on the command line.[3] * https://en.wikipedia.org/wiki/Control-V https://en.wikipedia.org/wiki/Control-V
- j1elo 11mo agoSeems to me a reasonable concern but I'd bet it's only for a minority of users... so perfect candidate to have implemented, but given as a disabled by default setting.
- co_dh 11mo agoI have to warning everyone: Windows terminal with true color , possibly with tmux, is very slow. There is a half second delay from key press to response. I am in a vdi. Your miles varies.
- ciberado 11mo agoThis doesn't correspond to my experience. The terminal is not faster than light, but good enough for my requirements, and I use it both locally and through VNC. May it be a problem with your VDI setup?
- usrbinbash 11mo ago> So convenient! Running in tmux, marking anything on my terminal immediately puts it into the tmux buffer, without me having to click anything on the keyboard. Pressing middle-mouse pastes it. THAT is convenience.
- rovingeye 11mo agoI have that turned on in Windows Terminal but still use ctrl+c because it's how all other software works
- ur-whale 11mo ago> immediately puts it into the tmux buffer Can you paste in a non-terminal app though (like a web browser) ?
- usrbinbash 11mo agoYes, of course I can. I have a separate binding in my tmux config to copy to the clipboard.
- biehl 11mo agoThat sounds like an awesome concept. However, I'm restarting Linux usage after 10 years on Mac, and I am surprised on how much less annoying the Shift-ctrl-v is compared to what I expected.
- fithisux 11mo agoYori is also a very capable replacement.