I edit a lot of files using netrw
in gvim
. Sometimes, when I mash C-s to save, it will hang my vim session. I'm not sure if this is because of a network error, or because I also sometimes hit C-z at about the same time and do something bad to the child process, like sending it a pause signal. After I do it, I can't seem to regain control of my session: mashing various combinations of Esc, C-c, C-q, Pause/Break, and so on don't seem to do anything.
I can hit "X" on the gvim window and get a prompt to save my unsaved work, so vim is still working, but I can't change tabs or use any of the gvim GUI or issue any normal mode commands. pstree
looks like this:
| |-gvim-+-bash---sftp---ssh
| | `-3*[{gvim}]
Is there something I can do in Vim to abort whatever netrw
script is running and get my command prompt back? Is it really hitting C-z at the wrong time that causes this, or is it something else? Is there something I can do at the system level, like killall -9 sftp
, that will make vim start listening to me again?
Is there something I can do to prevent this from happening in the future?
killall -9 sftp
. So I think my C-z is making it through to the other processes thatgvim
starts, and pausing the copy job. But I don't actually have access to that bash to put the job back into the foreground and I get stuck.