Commits

Peter Sagerson  committed ec63ee7

Restore some missing help content.

  • Participants
  • Parent commits 02c124b

Comments (0)

Files changed (1)

File doc/py-coverage.txt

 *py-coverage.txt*       For Vim version 7.3       Last change: 2012 October 25
 
-py-coverage
+
+                                 py-coverage
+
 
 ==============================================================================
 1. About                                                         *py-coverage*
 
 
 ==============================================================================
-2. Commands
+2. Installation and Use
+
+This plugin defines commands and a function, but no key mappings. Following is
+my local configuration, as an example:
+
+~/.vim/after/ftplugin/python/py-coverage.vim
+>
+    nnoremap <LocalLeader>mh :PyCoverageHighlight<CR>
+    nnoremap <LocalLeader>mc :PyCoverageClear<CR>
+    nnoremap <LocalLeader>mq :PyCoverageSetQuickfix<CR>
+    nnoremap <LocalLeader>ml :PyCoverageSetLoclist<CR>
+
+    highlight PyCoverageMissed gui=undercurl guisp=Orange
+<
+If you use the convention of always having your .coverage file at the root of
+your Python projects, then you may want to use an |autocmd| to show coverage
+information on new buffers whenever it's available.
+>
+    autocmd FileType python PyCoverageHighlight
+<
+This will add very little overhead in the case where no .coverage file can be
+found. When coverage data is available, it may take a second for the Python
+coverage tool to generate its report.
+
+
+==============================================================================
+3. Commands
 
 These commands all operate on the current buffer. Excepting
 |:PyCoverageClear|, they will all call |PyCoverageMissedLines| for the current
-buffer and process the line numbers as appropriate.
+buffer and process the line numbers as appropriate. If coverage data is not
+found for any reason, all commands will behave as if the file has 100%
+coverage (no missed lines). 
+
 
 :PyCoverageHighlight                                    *:PyCoverageHighlight*
     Uses |matchadd()| to highlight each line in the current buffer that lacks
     coverage. This uses the PyCoverageMissed highlight group, which is aliased
     to Error by default.
 
+:PyCoverageClear                                            *:PyCoverageClear*
+    Reverses |:PyCoverageHighlight|, removing all matches in the
+    PyCoverageMissed group.
+
+:PyCoverageSetQuickfix                                *:PyCoverageSetQuickfix*
+    Populates the quickfix list with the list of missed lines.
+
+:PyCoverageSetLoclist                                  *:PyCoverageSetLoclist*
+    Populates the current window's location list with the list of missed lines
+    for its buffer.
+
 
 ==============================================================================
-3. Functions
+4. Functions
 
 PyCoverageMissedLines({buffer})                        *PyCoverageMissedLines*
     Returns the |List| of line numbers that lack coverage in the given buffer.
 
 
 ==============================================================================
-4. Configuration
+5. Configuration
 
 All configuration options have sensible defaults.
 
 <
 
 ==============================================================================
-5. License
+6. License
 
 Copyright (c) 2012, Peter Sagerson
 All rights reserved.