Monday, September 4, 2017

Re: Sample asynchronous make plugin

Hi Bram,

On Sun, Sep 3, 2017 at 6:48 AM, Bram Moolenaar <Bram@moolenaar.net> wrote:
>
> 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().

>
> 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?

>
> 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.

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

Regards,
Yegappan

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