Using the Bash in VI mode
Activate VI
mode by running
set -o vi
Now use your Bash as if it were VI! Hit Esc
to enter command mode, jump around with e
, w
, b
, 0
, $
etc. and edit just as you're used to.
Bash history is searched with /
. See the linked cheat sheet for more hints.