-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing expansions for makeprg and grepprg #35
Comments
Your patch is incorrect, "%" will be expanded automatically by vim in the command line when you press ENTER and before passing to your User Command. It will be expanded twice in your patch (firstly by vim, secondly by StringReplace). It must be implemented very carefully by parsing "%" in &makeprg directly. |
I demonstrated otherwise. I wouldn't have been here if it worked! :-)
…On Feb 13, 2017 12:22 AM, "Linwei" ***@***.***> wrote:
Your patch is incorrect, "%" will be expanded automatically by vim in the
command line when you press ENTER and before passing to your User Command.
It will be expanded twice in your patch (firstly by vim, secondly by
StringReplace).
It must be implemented very carefully by parsing "%" in &makeprg directly.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#35 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAABXCayAQawKjWSQtYPSktA6xFk00W2ks5rcBLbgaJpZM4L-r2r>
.
|
See also #96 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary: I have some makeprg's that use vim
%
expansions. I want both:make
and:AsyncRun
to work consistently. As such I want to continue to use the % style macros. I would like for asyncrun.vim to support makeprg and grepprg that contain%
expansions.When I use
:AsyncRun -program=make
, I expect the same output as:make
, but instead I get, for examplepackage not found %:h
. This is becauseasyncrun#run
does not expand%
macros.I have found a partial solution to the same general problem in timbertson/vim-background-make@404905f
I have also locally applied a less complete patch as follows, which covers only my use case (no escaped expansions in my makeprgs), that could also be used as a possible approach:
https://gist.github.com/raggi/3bcbb18183be138f3b24718891921d9b
An example of a makeprg I would like to work:
setlocal makeprg=go\ build\ ./%:h;echo\ package\ %:h;echo;go\ test\ ./%:h
And the corresponding errorformat, demonstrating usage:
If you would like me to prepare a patch, let me know what your preferred approach will be, and I will add this to my TODO list.
Thanks!
The text was updated successfully, but these errors were encountered: