summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-05-29 14:42:49 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2017-05-29 14:42:49 +0100
commit1cab391bf9e3a8ebfe89598a50666156d7c8eae3 (patch)
tree9ba4b8e85edff7f3b558cd5fdb7c6a06e3f2e224
parentUse /tmp for tmp stuffs (diff)
downloadutil-1cab391bf9e3a8ebfe89598a50666156d7c8eae3.tar.bz2
util-1cab391bf9e3a8ebfe89598a50666156d7c8eae3.tar.xz
util-1cab391bf9e3a8ebfe89598a50666156d7c8eae3.zip
Add keymap to load coverage results
-rw-r--r--gvimrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/gvimrc b/gvimrc
index eee67e1..09068aa 100644
--- a/gvimrc
+++ b/gvimrc
@@ -34,6 +34,7 @@ au FileType c,cpp,jam,h,slice map <F5> :wa<CR>:set makeprg=b2\ -qj3<CR>:mak<CR>
au FileType c,cpp,jam,h,slice map <C-F5> :wa<CR>:set makeprg=b2\ -qj3\ pch=off<CR>:mak<CR>
au FileType c,cpp,jam,h,slice map <S-F5> :wa<CR>:set makeprg=b2\ -qj3\ variant=release<CR>:mak<CR>
au FileType c,cpp,jam,h,slice map <F6> :wa<CR>:set makeprg=b2\ -q<CR>:mak<CR>
+au FileType c,cpp,h map <S-F9> :call LoadCov()<CR><CR>
au FileType dot map <F5> :wa<CR>:set makeprg=dot\ %\ -Tpng\ -O<CR>:mak<CR><CR>
au FileType cpp,h map <F12> :wa<CR>:set makeprg=doxygen<CR>:mak<CR><CR>
map <F7> :lnext<CR>
@@ -53,6 +54,12 @@ set foldmethod=syntax
set foldcolumn=4
set foldlevel=100
+function! LoadCov()
+ execute "!(cd /tmp && find ". expand("%:p:h") ." -name *.o -path */coverage/* | xargs gcov -r -p > /dev/null)"
+ let path = "/tmp/".substitute(@%, "/", "\\\\\\\#", "g").".gcov"
+ echo path
+ execute ":GcovLoad ".path
+endfunction
function! SvnDiffDir()
let output = substitute(system('pwd | md5sum | cut -b-32'), "\n", "", "")
let path = "/tmp/svndiff-".output.".patch"