Monday, September 4, 2017

Re: Sample asynchronous make plugin

Yegappan wrote:

> >> I am attaching a sample asynchronous make plugin which runs
> >> the make command in the background and adds the make output
> >> to a quickfix list. This plugin relies on recent quickfix features
> >> added to Vim.
> >>
> >> To run make in the background, use the following command:
> >>
> >> AsyncMake
> >>
> >> You can supply arguments to 'make' by passing it to the
> >> above command.
> >>
> >> To display the current make command which is running, use
> >>
> >> AsyncMakeShow
> >>
> >> To stop the current make command, use
> >>
> >> AsyncMakeStop
> >
> > Thanks.
> >
> > I think you need to use shellescape() on the arguments.
> >
>
> If shellescape() is used to escape the make arguments, then passing
> make flags like "-w" doesn't work. For example, invoking
> ":AsyncMake -w -C src" doesn't work. The above command works
> without shellescape().

OK.

> > This adds location to a quickfix list. Now how do I jump around in
> > these locations?
> >
>
> You can use the regular quickfix commands to jump around the errors.
> Am I missing something here?

Assuming the user goes do something else while the build is running, how
to get to the right quickfix list? Using ":colder" to find it doesn't
really work. How to make the quickfix list of the plugin the current
one? There is an ID, thus it should be possible.

> > Would be nice to have the make output also show up in a terminal.
> > I wonder if that is possible.
>
> The plugin adds the complete make output to the quickfix list.
> So you can browse through the make output in the quickfix window.

Does that update while the build is progressing?

> I am attaching an updated version of the plugin. This version saves
> and uses the 'efm' that was set when the command was invoked.

Thanks.

--
hundred-and-one symptoms of being an internet addict:
73. You give your dog used motherboards instead of bones

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment