r/ProgrammerTIL • u/micouy • Apr 11 '20
Other TIAccidentallyDiscovered you can use Bash's Ctrl/Alt shortcuts in any(?) text field on macOS
Most useful to me:
Ctrl + adeselect/beginning of the textCtrl + edeselect/end of the text
That's pretty neat, especially if you want to i. e. deselect the address bar in a browser without reaching all the way to Esc. You can just press Ctrl + a. I don't think moving one word forward/backward is very useful since we have Alt + arrow but I'm posting bc I think it's interesting to know.
I couldn't find the whole list (or even any info about it) but you can test out the shortcuts from here (I think only the movement of the cursor works).
Note that instead of pressing Alt + key you have to press Ctrl + Alt + key. I've tested it in Chrome and in Spotlight Search but it seems you can use these shortcuts anywhere.
29
u/tomatoaway Apr 11 '20
They're both based on GNU Readline
4
u/Sedorner Apr 12 '20
Ctrl-t is one I use quite a bit, “twiddle” reverses two characters so teh becomes the.
Ctrl-d is delete next
2
u/beginpanic Apr 12 '20
I work on a MacBook but spend a lot of my day in Remote Desktop on a Windows server and every time I try to use these shortcuts I’m always disappointed. I’ve gotten too used to them over the years.
2
u/OptimusCrimee Apr 12 '20
Ctrl + kto delete to the end of the line.2
u/nthcxd Apr 12 '20
Ctrl + R?
0
u/[deleted] Apr 11 '20
[deleted] — view deleted comment
0
u/[deleted] Apr 12 '20
[deleted] — view deleted comment