gvim remote tab with command possible?
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 --r开发者_如何学Goemote-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 :)
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.
精彩评论