Bash – Jump to start of the line in Bash’s Vi mode

bashkeyboard shortcutsvi

I'm using Bash Vi mode (aka set -o vi). Still I miss the Ctrl-A shortcut from Emacs mode, which is very handy. Many times I'm retrieving the last command and append an echo to the beginning of the line in order to save it to a file.

Is there a convenient way to jump to the start of the line while in insert mode?

And by convenient I mean that it's accessible by two sensible buttons shortcut. So Esc,I is not good enough, because Esc is too far, and Ctrl+[,I is not good because I need to type three consecutive letters, not sleek enough.

Best Answer

Press the Home key if it's not too far. Or bind Ctrl+A:

set -o vi
bind '\C-a:beginning-of-line'