This weekend I came across a couple posts on Daily Vim about using vi in other applications such as bash, irb, mysql, or any other readline application.
To use vi mode for all readline applications, including bash, put the following line in your ~/.inputrc file.
set editing-mode vi
To use vi mode for bash only, put the following line in your ~/.bash_profile.
set -o vi
With these features enable, you’re dropped into insert mode and from there you can hit Esc or Ctrl-[ to change to command mode. Enjoy.
