4

The simplified version of my question is how can I achieve a command such as the following.

gvim --remote-tab-silent -c mak

When I run this command I am hoping for a new tab to be opened, and to have the make command run. What actually happens however is there are two new tabs "-c" and "mak"

Is there a way to do this? My end goal is to be able to within vim run a command such as this to give me asynchonous make output.

!gvim --remote-tab-silent -c mak

Thanks in advance.

--EDIT-- I found the documentation for --remote, which explains how to do a remote command with opening a file. The syntax applies to remote-tab apparently.

To do what I want I am now using

gvim --remote-tab-silent +mak MakeOutput

Similarly inside vim I can use

!gvim --remote-tab-silent +mak MakeOutput

It automatically opens the first error in a file for me, which is convenient I would think :)

ostler.c
  • 2,953
  • 3
  • 20
  • 21

1 Answers1

0

It seems like what you're asking is how to execute commands asynchronously with updates when they complete.

Have a look at my AsyncCommand plugin. It's just wraps the vim syntax required to execute something and load it with --remote. I've uploaded AsyncCommand 2.0 that includes an AsyncMake command.

Add the script to your .vim/plugin and you can build with :AsyncMake or :AsyncMake target. Errors will be opened in your quickfix once the make completes.

idbrii
  • 10,113
  • 5
  • 57
  • 100