3 ms·
There are several keyboard shortcuts that you would never find out from watching an agent, but are mindblowing to new Linux users. I suck at remembering vim key
by throwaway219450 19d ago
There are several keyboard shortcuts that you would never find out from watching an agent, but are mindblowing to new Linux users. I suck at remembering vim keybindings, but I have ingrained ctrl+a ctrl+e for jumping to the start/end of a string (which also works all over OS X). I had been a developer for an embarassing amount of time before I discovered those.
There are other terminal specific shortcuts for removing last word (ctrl+w) but they don't seem to be as portable.
- gosub100 19d agoAnother one, not quite as handy but still awesome: ctrl s / ctrl-q. This freezes/unfreezes the terminal output so you can read it, without interrupting your program. Useful for very fast walls of text.
- TeMPOraL 19d agoOh so that is what this is for. I thought ctrl-q / ctrl-s are there as a nasty way to screw with users, who every now and then accidentally press one of these, and find their terminal frozen and no longer visibly reacting to input, for no apparent reason.
- deleted 19d ago[deleted]
- zem 19d agothere was an old riddle I saw on usenet, "there is a key I use for one of its intended purposes several times a day, but when it stopped working I never missed it. what key was that?". the answer was the caps lock key, one of whose intended purposes was reverting back to normal after accidentally pressing it to go into caps mode.
- abustamam 18d agoI rebind capslock on all my new computers, usually to ctrl or cmd.
- spider-mario 18d agoMine is usually Esc or, when it’s an option, “Esc when pressed, Ctrl when held”.
- mkehrt 18d agoYou can disable this misbegotten feature with stty -ixon
- throwaway219450 18d agoAh this is also a fun default feature of Powershell, except it works on mouse click.
- zh3 18d agoThat's actually XON/XOFF - in the old days when computers could send serial data to your VT100 or whatever faster than it could handle it (and we're talking 9600 baud here), the terminal would send XOFF (ctrl-S) telling the computer to stop sending - then, when the terminal caught up, it would send XON (ctrl-Q) to let the system know it could resume sending. The advantage of doing it this way ('software flow control') is it worked with just TX and RX lines, rather than having to connect up additional wires to indicate when the terminal was busy ('hardware flow control').
- gosub100 18d agoI remember the ole flow control :(rts/cts | xon xoff) from hyperterminal on windows :)
- kccqzy 19d agoIt can’t always not interrupt your program. Think about it: after you press Control S to trigger XOFF, the fast output has to be buffered in memory. That memory is certainly not unlimited. There’s no way for the program to keep outputting text. Indeed some programs (including Claude Code, at least a while ago) really don’t like it when you press Control S and let the terminal be frozen for a very long time.
- mkehrt 18d agoInteresting; I assumed the write to stdout would just hang for the writing program.
- SAI_Peregrinus 19d agoI remember when the Pause key did that! It's long enough ago that I don't remember which systems did so, and most laptops don't even have a Pause key any more, but it was often very handy for reading fast-moving console output.
- sprinkly-dust 19d agoThe OS-wide Emacs bindings are one of the main things still keeping me on macOS; in editors like Helix (or Zed with Helix mode) I invoke these really cursed combinations of the Helix(vim-like) shortcuts in the editor with the Emacs ones from the OS and it feels really natural as a means of moving around text. I haven't put in enough effort to replicate the experience on GNOME but once I jump ship from Apple I'll have to. The way macOS treats shortcuts thanks to the separation of Command and Control is great. It even makes Google Docs pretty painless to use because it's mostly like Emacs. Word still tries to hijack the shortcuts so that's suboptimal.
- ifyoubuildit 19d agoI think gnome just had this as an option somewhere. Asking chatgpt says that this was removed in GTK4, so maybe it's no longer a thing?
- cirelli94 18d agoI can still do everything in gnome with a shortcut, but not in vim style.
- zem 19d agoctrl+u and ctrl+k (to delete the line forward/backward from the cursor) are super useful too
- embedding-shape 18d agoctrl+u generally works for lots of password prompts to reset/remove what was typed, wherever you come across a password prompt and a keyboard including those two keys.