Closed aj3423 closed 4 years ago
I defined a function which calls ':AsyncRun` to launch an external konsole terminal. Everytime before I launch the terminal, I have to kill the previous one, like this:
function restart_job() :AsyncStop! exe 'sleep 100m' :AsyncRun konsole --noclose -e ... endfunction
If I don't sleep for 100 milliseconds. the previous job is not terminated yet, which causes error:
sleep
ERROR: background job is still running
Any better way of restarting job without using the sleep?
Try this:
AsyncRun -mode=hide konsole --noclose -e ...
And maybe you want to define a new runner for konsole:
https://github.com/skywind3000/asyncrun.vim/wiki/Customize-Runner
I defined a function which calls ':AsyncRun` to launch an external konsole terminal. Everytime before I launch the terminal, I have to kill the previous one, like this:
If I don't
sleep
for 100 milliseconds. the previous job is not terminated yet, which causes error:Any better way of restarting job without using the
sleep
?