by mastazi · 4y ago · 0 comments
in MacOS there is no unified way to get to the beginning or end of a line. In Linux and Windows this is done with the Home and End keys. In Mac, there are some shortcuts but they are not universal, what works in terminal may not work in a browser textarea and so on. Some programs interpret the same shortcut as "go to the very end of the text (as in a PgDown key) but that same shortcut, in another program, might go to the end of the line (like the End key).
Please let me know if I'm missing something! Every time I make a web search about this topic, I end up in various pages like this one[1] with shortcuts that don't work for me for the reasons explained above.
EDIT: I found out that there are some Mac keyboards with the Home and End keys. So it seems that this is not an OS issue but, I guess, a MacBook issue (I've only ever used MacBooks and always without external keyboard).
The text system also has a basic kill-yank separate from copy paste. So you can Ctrl-K to kill a line, then Ctrl-y to yank it out elsewhere in basically every text input in the OS.
And terminal has ctrl+a and ctrl+e. My mnemonics: A is for Anfang (german: start, beginning), e is just End.
On windows I was confused as to whether Pos1/End gets me to file ending, or line ending. I think it's the first, unless you hit a modifier key.
But I use this functionality extensively when outside the terminal.