I have a macro that calls APIs to fetch data based on information in a buffer. Is it possible to have the macro continue execution while I move to another window and work on other buffers?

  • 1
    It really is a macro; essentially it goes like this yypV:!bash^Mk Oct 25, 2023 at 13:10
  • 1
    I don't think it is possible. You could be interested to the following question. Oct 25, 2023 at 13:21
  • 1
    @VivianDeSmedt Hmm... Is it possible to run the macro from a function called from a timer somehow. Oct 25, 2023 at 13:24
  • 2
    Background tasks need jobs (:help channel). Timers are blocking once they fire, IIRC.
    – D. Ben Knoble
    Oct 25, 2023 at 14:23
  • 1
    You should edit your question to include the macro. I suggest you also explain what it does and what greater goal you hope to achieve with it. Give some context. Maybe a member of the community will come up with a solution for your original problem.
    – Friedrich
    Oct 25, 2023 at 14:24


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.