what is the style of command line editing used by the terminal emulator?
OS X ships with bash and you will want to set -o vi to get vi-style commands. A very popular choice is zsh and the many customization packages like oh-my-zsh. Neither she'll is fully in either style by default.

For emacs style, it's similar - see this great post for more details:


  You switch between the two modes in bash, zsh or ksh with set -o vi or set -o emacs, and with bindkey -e or bindkey -v in tcsh or zsh.