Freeing up the terminal when using gVim
Is there a way to free my terminal from starting the gVim process without exiting gVim so that I can continue using the terminal? I would like to be able to do something similar to what I am doing with emacs. With emacs, I can either use a command emacs [file]
to make the process go through the terminal, or I can use a command runemacs [file]
to free the terminal.
I start gVim with the command:
gvim [file]
and then the terminal freezes while I :quit
gVim. When I searched the internet for an answer to this question, people advised what is best to use ctrl-z
to pause the vim process and then use fg
to return. However, this does not work for me both on the command line and in gVim mode. I am using Git Bash for my terminal on Windows 7.
source to share
You can run gvim in the background like any other process:
gvim [file] &
After executing this command, you will receive a message indicating the pid of the new process. When you're done, you will receive a similar message in this shell.
Edit:
The ctrl-z
/ problem fg
is probably related to windows. This question says that GitBash will create a new shell instead of reverting to the current one, so it probably doesn't work like it does on Linux. A possible solution would be to run your commands from gVim, either invoke the shell through :!
on mappings, or plugins / commands ( fugitive for git, :py
or some plugin for python interpreter, etc.).
source to share