0

would it be possible to run an arbitrary command in a terminal (like node tests.js or cucumber -p @wip) whenever any of the open buffers in vim are saved? I guess I'm thinking of a save hook or something like that. But I'd be satisfied with a hack I could implement, like maybe scanning a directory of lock (or swap or whatever) files, inferring the open filenames from that and piping the command to entr with something like <list-of-files> | entr -r cucumber -p @wip. Thanks for any and all advice! Doug.

  • Welcome to Vi and Vim! I hope the linked duplicate can help you solve your problem. If it doesn’t, you can edit to clarify how your question is different or ask a new question altogether. – D. Ben Knoble Dec 12 '19 at 13:13

Browse other questions tagged or ask your own question.