asynctasks.vim
asynctasks.vim copied to clipboard
Support for callbacks after a task is complete?
Hey,
This is a really neat plugin, and I already have defined a bunch of tasks. One feature I haven't found yet and that I miss is the ability to have a (vimscript) callback on exit. In particular, I want to update my statusline (e.g. have a red square) if the exit code is >= 1 , green square if the exit code is 0 and a yellow square if the task is still running.
- Is it possible to do something like that already?
- If not, would you consider adding a callback feature that would enable me to do this?
Edit: Looks like the notify example is a nice starting point if I just want the message to be echoed on the statusline. In that case, I'll add notify=echo to the task. It would be nice to also have notify=callback:my_vimscript_function that I could call.
https://github.com/skywind3000/asynctasks.vim/wiki/Task-Examples#silence-and-notify
please update to the latest version, notify no accept vimscript starting with a :
notify=:call MyTaskFinished()