Reputation: 24248
I have waste many time for googling, but didn't find solution. But I have seen this. Which key combination need use? Thanks.
Upvotes: 2
Views: 4026
Reputation: 12383
If you mean a shell by "exit" you can try this command:
:shell
then you a shell and you can get back to Vi by leaving the shell with
exit
or by pressing CTRL-D.
Upvotes: 3
Reputation: 72795
You can suspend vim
if it's in a terminal using Ctrl-Z
and then say fg
to get it back to the foreground. You can also run a shell using ! /bin/bash
and then exit it to return to the editor.
Upvotes: 8
Reputation: 2630
What I generally use, when calling vi from a shell, is the :shell
command to start a new shell, and then Control-D when I’m over (the shell then quits and goes back to the file(s) I was editing with vi).
Upvotes: 2
Reputation: 19965
Use control-Z. When you want to get back into vi, use fg from the shell prompt.
Upvotes: 5