What do you mean you've never used Emacs? mumble whippersnappers mumble
EDIT: In bash, that is. It's `bindkey -v` in zsh.
set editing-mode vi
Now any executable that uses readline will have vi editing commands on its command line. mysql, psql, etc.
Do as much of your command line editing configuration in .inputrc as possible, and you'll have it everywhere.
EDIT: man readline
What do you mean you've never used Emacs? mumble whippersnappers mumble