This is a terminal emulator written in EmacsLisp. Now you can run vi (or mutt! (see MuttInEmacs) (or Emacs! 😊)) in an Emacs buffer!

Start ansi-term with ‘M-x ansi-term’.

Historically, ‘M-x ansi-term’ differed from ‘M-x term’ in that the latter couldn’t render colours. These days (ref) the latter has caught up, so the main practical difference is now that ansi-term uses ‘C-x’ for a prefix key, while term sticks with only the older ‘C-c’ binding. They also use slightly different buffer names.

In Emacs 22, try prefixing actions that aren’t recognized by their standard key commands with ‘C-x’. For example, ‘M-x’ becomes ‘C-x M-x’.

For more configuration options see AnsiTermHints

NB: While ‘ansi-term’ and ‘term’ are closely related to each other, they shouldn’t be confused with the entirely separate (and obsolete as of 24.4) terminal.el package which provides ‘M-x terminal-emulator’.