Moving efficiently in the CLI - lmmx/devnotes GitHub Wiki
Totally mindblown by this!
key | result |
---|---|
Ctrl A |
Move: start of line |
Ctrl E |
Move: end of line |
Alt B |
Move: start of word |
Alt F |
Move: end of word |
Ctrl B |
Move: start of word |
Ctrl F |
Move: end of word |
Ctrl W |
Delete: preceding characters in word |
Alt D |
Delete: current and following characters in word |
Ctrl U |
Delete: preceding characters of line |
Ctrl K |
Delete: current and following characters of line |
N.B. - for those using tmux
like me, the default (I think?) keybinding for actions (e.g. changing panes) is Ctrl
B
, forcing you to double tap B
to move back one character
update - a minority of these work in vim (Alt
B
, Ctrl
W
, and Ctrl
U
)
- via Clément Chastagnol's blog post
- in turn via How Linux Works