Steps to reproduce this:
- open emacs
- M-x
shell
RET vi tmpfile
RET
Then you'll see the vi interface is a mess. To quit this, try to blind input :q!
or just close the shell buffer.
The reason I use "vi" within emacs is that I use emacs shell-mode heavily and sometimes I ssh to another host within it. On the remote host, i have a reason to use "vi" when i need to edit some file and emacs is absent there.
Your help is appreciated.