File data/vim/autoload/uncov.vim changed (mode: 100644) (index c72ec43..15cf322) |
6 |
6 |
|
|
7 |
7 |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
8 |
8 |
|
|
|
9 |
|
let s:initialized = 0 |
|
10 |
|
|
9 |
11 |
function! uncov#ShowCoverage(reload, ...) abort |
function! uncov#ShowCoverage(reload, ...) abort |
|
12 |
|
if !s:initialized |
|
13 |
|
let s:initialized = 1 |
|
14 |
|
call s:Initialize() |
|
15 |
|
endif |
|
16 |
|
|
10 |
17 |
let l:buildid = '@@' |
let l:buildid = '@@' |
11 |
18 |
if a:0 > 0 |
if a:0 > 0 |
12 |
19 |
if a:1 !~ '^@-\?\d\+\|@@$' |
if a:1 !~ '^@-\?\d\+\|@@$' |
|
... |
... |
function! uncov#ShowCoverage(reload, ...) abort |
27 |
34 |
call s:MakeBuffer(l:repo, l:relFilePath, l:buildid, a:reload) |
call s:MakeBuffer(l:repo, l:relFilePath, l:buildid, a:reload) |
28 |
35 |
endfunction |
endfunction |
29 |
36 |
|
|
|
37 |
|
function! s:Initialize() |
|
38 |
|
augroup Uncov |
|
39 |
|
autocmd! ColorScheme * |
|
40 |
|
\ highlight UncovCovered ctermbg=darkgreen guibg=darkgreen |
|
41 |
|
\| highlight UncovMissed ctermbg=darkred guibg=darkred |
|
42 |
|
augroup end |
|
43 |
|
doautocmd Uncov ColorScheme |
|
44 |
|
|
|
45 |
|
" mind that text is set to unbreakable space |
|
46 |
|
sign define UncovCovered text= texthl=UncovCovered |
|
47 |
|
sign define UncovMissed text= texthl=UncovMissed |
|
48 |
|
endfunction |
|
49 |
|
|
30 |
50 |
function! s:MakeBuffer(repo, relFilePath, buildid, reload) abort |
function! s:MakeBuffer(repo, relFilePath, buildid, reload) abort |
31 |
51 |
let l:coverageInfo = systemlist('uncov '.a:repo.dir().' get '.a:buildid.' /' |
let l:coverageInfo = systemlist('uncov '.a:repo.dir().' get '.a:buildid.' /' |
32 |
52 |
\.shellescape(a:relFilePath)) |
\.shellescape(a:relFilePath)) |
File data/vim/plugin/uncov.vim changed (mode: 100644) (index 6792e1a..8aa5c2d) |
... |
... |
if exists('loaded_uncov') |
11 |
11 |
endif |
endif |
12 |
12 |
let loaded_uncov = 1 |
let loaded_uncov = 1 |
13 |
13 |
|
|
14 |
|
augroup Uncov |
|
15 |
|
autocmd! ColorScheme * |
|
16 |
|
\ highlight UncovCovered ctermbg=darkgreen guibg=darkgreen |
|
17 |
|
\| highlight UncovMissed ctermbg=darkred guibg=darkred |
|
18 |
|
augroup end |
|
19 |
|
doautocmd Uncov ColorScheme |
|
20 |
|
|
|
21 |
|
" mind that text is set to unbreakable space |
|
22 |
|
sign define UncovCovered text= texthl=UncovCovered |
|
23 |
|
sign define UncovMissed text= texthl=UncovMissed |
|
24 |
|
|
|
25 |
14 |
command! -nargs=? Uncov call uncov#ShowCoverage(0, <f-args>) |
command! -nargs=? Uncov call uncov#ShowCoverage(0, <f-args>) |
26 |
15 |
|
|
27 |
16 |
" vim: set tabstop=4 softtabstop=4 shiftwidth=4 expandtab : |
" vim: set tabstop=4 softtabstop=4 shiftwidth=4 expandtab : |