<br><br><div class="gmail_quote">On Tue, Sep 4, 2012 at 7:35 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, Sep 4, 2012 at 9:23 AM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br></div><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div><div>On Tue, Sep 4, 2012 at 5:05 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>On Tue, Sep 4, 2012 at 8:01 AM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br></div></div><div class="gmail_quote">
<div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote">On Tue, Sep 4, 2012 at 4:38 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div><div>...</div></div><div><div>Remove.</div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
+ let l:output = system(a:cmd)<br>
</div><div>+ cexpr l:output<br>
+ cwindow<br></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>+ let w:quickfix_title = a:cmd<br>
</div><div>+ if v:shell_error != 0<br>
</div>+ cc<br>
<div>+ endif<br></div></blockquote><div><br></div></div><div>Replace all that with</div><div><br></div><div><div> let l:oldmakepgr = &makeprg</div><div> let &makeprg = a:cmd</div><div> silent make | cwindow</div>
<div><div> let &makeprg = l:oldmakepgr</div></div><div><br></div><div>(Gives you a warning when trying to compile a modified buffer too)</div></div></div></div>
</blockquote></div>Doesn't work for me: after running your code vim (7.3, if this matters) doesn't repaint it's window, and I end up having a blank screen until I make vim repaint everything.</blockquote><div>
<br></div></div></div><div>If you don't use gvim, you might need a</div><div><br></div><div><div> if !has('gui') redraw! endif</div></div></div></blockquote></div></div><div>1. Have you tried to use your snippet?</div>
<div>
2. If yes, what version of vim do you use?</div></div></blockquote><div><br></div></div><div>Yes, it's what we use in some vim helper script some chromium folks use. I use it with 7.3. ( <a href="http://git.chromium.org/gitweb/?p=chromium/src.git;a=blob;f=tools/vim/ninja-build.vim#l80" target="_blank">http://git.chromium.org/gitweb/?p=chromium/src.git;a=blob;f=tools/vim/ninja-build.vim#l80</a> )</div>
<div class="im">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div>As for this line, my vim understands it only after I add delimiters: <font face="courier new, monospace">if !has('gui') | redraw! | endif</font></div>
<div>But the problem is not with it, it's with :make also not giving a warning when trying to compile a modified buffer. And even if it did complain about _current_ buffer being modified, we probably need it to display warning _any_ buffer is modified (it's the most consistent way to avoid stale files being compiled, I think).</div>
<div><br></div><div>So, currently, I don't see any advantages of your version.</div></div></blockquote><div><br></div></div><div>It has the advantage that it does the things documented at `:help :make`. It's also a bit shorter.</div>
</div></blockquote><div>As you suggest using :make for implementation rather than as an interface, the only advantage I see is the auto-save feature if the autowrite option is set. This is just one line of code, that I've already added. "A bit shorter" argument here is no more important than consistency and convenience of usage, so I would stick with a solution which is 4 lines of code more, but is easier customizable. If you see any other things in functionality we could improve, suggestions are welcome.</div>
<div><br></div></div><div><br></div>-- <br>
<div>Regards,</div><div>Alex</div>