2013/5/3 Gautier DI FOLCO <[email protected]>

>
>
>
> 2013/5/2 Benji Fisher <[email protected]>
>
>> On Thu, May 2, 2013 at 5:19 PM, Gautier DI FOLCO <
>> [email protected]> wrote:
>>
>>> Hi all,
>>>
>>> I need to integrate a Code Coverage tool in ViM for C code, I have
>>> founded gcov and a demo on Youtube :
>>> http://www.youtube.com/watch?v=5aI3DOwqSQI
>>> It seems to work pretty well but I can't find the plugin used.
>>>
>>> Have you got an idea where can I find it or a link to a
>>> better/equivalent plugin?
>>>
>>> For your help,
>>> Thanks by advance.
>>>
>>
>>      If I Google for "gocv.vim" then this comes up:
>> http://www.vim.org/scripts/script.php?script_id=2118 .  Is that what you
>> want?
>>
>
> I had founded this plugin, but it is pretty unusable (it forces to keep
> two windows open).
> Do you use another tool more integrated to vim?
>

Hi all, I have wrote a piece of code (let's call it vcov.vim) which fits my
needs:

function! Setcov(filename)
    exe ":sign unplace *"
    for line in readfile(a:filename)
        let d = split(line, ':')
        let c = substitute(d[0], " *", "", "")
        let l = substitute(d[1], " *", "", "")
        if '-' != c && c !~ '#'
            exe ":sign define c" . c . " text=" . c . ""
            exe ":sign place " . l . " line=" . l . " name=c" . c . "
file=" . expand("%:p")
        elseif c =~ '#'
            exe ":sign define cd text=#"
            exe ":sign place " . l . " line=" . l . " name=cd file=" .
expand("%:p")
        endif
    endfor
endfunction

Happy testing!

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to