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 forwar
by SeoxyS 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.
> The keyboard tab in Terminal's preferences? Or switch from Emacs-like to Vim-like navigation in the terminal?
Here's some Terminal editing text:
- `alt-left / right` skips a word in either direction (these work in the entire cocoa text system)
- `esc backspace` deletes an entire word
- `ctrl-a and ctrl-e` skip to the beginning and end of the line respectively (again, entire cocoa text system)
- `ctrl-k` deletes any character from the cursor to the end of line (ditto)
Also, learning how to use these bash tricks will make your life a lot easier too:
- `!!` will repeat the previous command, and you can prefix it. Say you forgot to `sudo` something, just type `sudo !!` to repeat it.
- `!whatever` will repeat the last command in the history starting with `whatever`.
- `!$` will evaluate to the argument of the previous command. so `ls Desktop` followed by `echo !$` will echo "Desktop."