Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for callbacks after a task is complete? #72

Open
kvalv opened this issue Jul 14, 2021 · 1 comment
Open

Support for callbacks after a task is complete? #72

kvalv opened this issue Jul 14, 2021 · 1 comment

Comments

@kvalv
Copy link

kvalv commented Jul 14, 2021

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.

  1. Is it possible to do something like that already?
  2. 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.

@skywind3000
Copy link
Owner

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants