.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Devel::Cover::Report::Vim 3pm" .TH Devel::Cover::Report::Vim 3pm "2018-11-30" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Devel::Cover::Report::Vim \- Backend for displaying coverage data in Vim .SH "VERSION" .IX Header "VERSION" version 1.31 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& cover \-report vim .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides a reporting mechanism for displaying coverage data in Vim. It is designed to be called from the \f(CW\*(C`cover\*(C'\fR program. .PP By default, the output of this report is a file named \f(CW\*(C`coverage.vim\*(C'\fR in the directory of the coverage database. To use it, run .PP .Vb 1 \& :so cover_db/coverage.vim .Ve .PP and you should see signs in the left column indicating the coverage status of that line. .PP The signs are as follows: .PP .Vb 5 \& P \- Pod coverage \& S \- Statement coverage \& R \- Subroutine coverage \& B \- Branch coverage \& C \- Condition coverage .Ve .PP The last of the criteria, in the order given above, is the one which is displayed. Correctly covered criteria are shown in green. Incorrectly covered criteria are shown in red. Any incorrectly covered criterion will override a correctly covered criterion. .PP If the coverage for the file being displayed is out of date the a function called \fBCoverageOld()\fR is called and passed the name of the file. Similarly, for current coverage data file CoverageValid is called. .PP Signs may be overridden in a file named devel\-cover.vim located somewhere underneath the ~/.vim directory. .PP For example, I use the solarized theme and keep the following commands in my local configuration file ~/.vim/local/devel\-cover.vim: .PP .Vb 4 \& let s:fg_cover = "#859900" \& let s:fg_error = "#dc322f" \& let s:bg_valid = "#073642" \& let s:bg_old = "#342a2a" \& \& let s:types = [ "pod", "subroutine", "statement", "branch", "condition", ] \& \& for s:type in s:types \& exe "highlight cov_" . s:type . " ctermbg=1 cterm=bold gui=NONE guifg=" . s:fg_cover \& exe "highlight cov_" . s:type . "_error ctermbg=1 cterm=bold gui=NONE guifg=" . s:fg_error \& endfor \& exe "highlight SignColumn ctermbg=0 guibg=" . s:bg_valid \& \& " highlight cov ctermbg=8 guibg=#002b36 \& " highlight err ctermbg=0 guibg=#073642 \& \& function! s:set_bg(bg) \& for s:type in s:types \& exe "highlight cov_" . s:type . " guibg=" . a:bg \& exe "highlight cov_" . s:type . "_error guibg=" . a:bg \& endfor \& exe "highlight SignColumn ctermbg=0 guibg=" . a:bg \& endfunction \& \& function! CoverageValid(filename) \& call s:set_bg(s:bg_valid) \& endfunction \& \& function! CoverageOld(filename) \& call s:set_bg(s:bg_old) \& endfunction .Ve .PP This configuration sets the background colour of the signs to a dark red when the coverage data is out of date. .PP coverage.vim adds two user commands: :Cov and :Uncov which can be used to toggle the state of coverage signs. .PP The idea and the vim template is shamelessly stolen from Simplecov-Vim. See https://github.com/nyarly/Simplecov\-Vim .SH "SEE ALSO" .IX Header "SEE ALSO" .Vb 2 \& Devel::Cover \& Simplecov\-Vim (https://github.com/nyarly/Simplecov\-Vim) .Ve .SH "BUGS" .IX Header "BUGS" Huh? .SH "LICENCE" .IX Header "LICENCE" Copyright 2012\-2018, Paul Johnson (paul@pjcj.net) .PP This software is free. It is licensed under the same terms as Perl itself. .PP The latest version of this software should be available from my homepage: http://www.pjcj.net .PP The template is copied from Simplecov-Vim (https://github.com/nyarly/Simplecov\-Vim) and is under the \s-1MIT\s0 Licence. .PP The \s-1MIT\s0 License .PP Copyright (c) 2011 Judson Lester .PP Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \*(L"Software\*(R"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: .PP The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. .PP \&\s-1THE SOFTWARE IS PROVIDED \*(L"AS IS\*(R", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\s0