Open krishnakumarg1984 opened 4 years ago
You can use g:asyncrun_exit
to do something like this, I think:
let g:asyncrun_exit = 'call timer_start(500, {-> execute("cclose")})'
A full function could be used as the callback if you want more logic to decide whether to close the qf window or not. There's also the QuickFixCmdPost
autocmd.
For example, if I am editing a single-file project (C++ source code) and upon running Asyncrun on it, there are no errors or warnings and the build completed successfully, then after a certain user-configurable delay, I would like the quickfix window to disappear automatically.
I know I can do
:ccl[ose]
, but it quickly becomes tedious. Instead, I just want the quickfix window to be open for just enough time to comfortably read that[finished in x seconds]
and then just get out of my way.Can
asyncrun
orasynctasks
somehow incorporate this?