[cfe-commits] [PATCH] New clang-check vim integration script

Alexander Kornienko alexfh at google.com
Tue Sep 4 09:23:19 PDT 2012


On Tue, Sep 4, 2012 at 5:05 PM, Nico Weber <thakis at chromium.org> wrote:

> On Tue, Sep 4, 2012 at 8:01 AM, Alexander Kornienko <alexfh at google.com>wrote:
>
>>
>>
>> On Tue, Sep 4, 2012 at 4:38 PM, Nico Weber <thakis at chromium.org> wrote:
>>
>>> ...
>>> Remove.
>>>
>>>
>>>>  +  let l:output = system(a:cmd)
>>>> +  cexpr l:output
>>>> +  cwindow
>>>>
>>> +  let w:quickfix_title = a:cmd
>>>> +  if v:shell_error != 0
>>>> +    cc
>>>> +  endif
>>>>
>>>
>>> Replace all that with
>>>
>>>   let l:oldmakepgr = &makeprg
>>>   let &makeprg = a:cmd
>>>   silent make | cwindow
>>>   let &makeprg = l:oldmakepgr
>>>
>>> (Gives you a warning when trying to compile a modified buffer too)
>>>
>> 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.
>
>
> If you don't use gvim, you might need a
>
>   if !has('gui') redraw! endif
>
1. Have you tried to use your snippet?
2. If yes, what version of vim do you use?

As for this line, my vim understands it only after I add delimiters: if
!has('gui') | redraw! | endif
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).

So, currently, I don't see any advantages of your version.


> too.
>
>
>>
>>
>>
>> --
>> Regards,
>> Alex
>>
>
>


-- 
Alexander Kornienko | Software Engineer | alexfh at google.com | +49 151 221
77 957
Google Germany GmbH | Dienerstr. 12 | 80331 München
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120904/c5538b1f/attachment.html>


More information about the cfe-commits mailing list