4 ms·
Obligatory XKCD: https://xkcd.com/1053/ https://xkcd.com/1053/ Just to pile on with fun new keyboard tricks! Caveat: "linux" here is largely specific to the De
by cpfohl 6y ago
Obligatory XKCD: https://xkcd.com/1053/ https://xkcd.com/1053/
Just to pile on with fun new keyboard tricks! Caveat: "linux" here is largely specific to the Desktop environments I've worked with. 'Good terminals' refers to termianls that support emacs keybindings by default, which is the mac os terminal, and most linux bash/zsh terminals at least. I know Cygwin and Conemu respect this under normal usage too.
## Start and end of line:
- Mac: CMD + left, CMD + right
- Linux/PC: Home and End Buttons
- Linux/Mac/Good Terminals: ctrl+a ctrl+e
## "Word-wise" movement:
- Mac: option+left, option+right
- Linux/PC: alt+left, alt+right
- Good Terminals: alt+b, alt+f (mnemonic: 'back' and 'forward')
The 'shift' key can be added to any of the above to select whole words or lines, or parts of lines at a time. Combined with multiple insertion points you've got superpowers.