3 ms·
> In the default Terminal app, there are no shortcuts (at least none that I could figure out) for moving around the text I'm typing quickly, like going forward
by __david__ 15y ago
> In the default Terminal app, there are no shortcuts (at least none that I could figure out) for moving around the text I'm typing quickly, like going forward and back a whole word, or going Home or End, you have to hold down the left or right arrows for a while.
What? I don't think you understand how terminals work! The terminal commands (on every terminal I've used for the past 20 years) are interpreted by the server. If your terminal is connected to a unix machine then generally emacs key navigation is the default. This is true for Mac OS X. Meta-F and Meta-B go forward and backward by words. Meta-delete deletes a word. C-a (and the HOME key) will go to the beginning of a line. C-e (and the END key) will go to the end.
That being said there's a couple annoying (for powerusers) defaults in Terminal. I always use the "option is meta" setting so I can type Option-f when I mean M-f. Otherwise I have to type ESC-f which is harder for me. The other is that the naked HOME and END keys are by default bound to scrolling the terminal window and you have to press SHIFT-HOME and SHIFT-END to get Terminal to actually send the HOME and END character sequence through the terminal (same for page-up and page-down which are also stupidly backward). If you come from Linux and are used to using SHIFT-PAGE-UP for look at your scrollback then it can be annoying. But luckily those are easily fixed.
- oinksoft 15y agoIf what __david__ says is new to anyone, I suggest you become familiar with http://tiswww.case.edu/php/chet/readline/readline.html#SEC13 http://tiswww.case.edu/php/chet/readline/readline.html#SEC13 Terminals border on unusable without knowing these commands.
- mturmon 15y agoAnd those commands have to be interpreted by the shell (e.g., bash) and not by the terminal emulator, because power users expect the shell to jump in, in the middle of a line, and provide information -- such as in-place file globbing or variable expansion, or command completion. The parent comment must not be used to this standard capability.