Ⅰ. 插件描述
Show python coverage resultsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/py-coverage'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/py-coverage'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/py-coverage'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/py-coverage
Ⅳ. 文档说明
py-coverage integrates with Ned Batchelder's code coverage tool for Python
(http://nedbatchelder.com/code/coverage/). After coverage data has been
gathered, this plugin can be used to retrieve the results and present them in
the relevant buffers.
Source lines lacking coverage ("missing") may be indicated by directly
highlighting the lines or by populating the quickfix or location lists. The
function that retrieves the line numbers is also provided for low-level
access.
:PyCoverageHighlight - Add missing lines in the current buffer to the PyCoverageMissing highlight group.
:PyCoverageClear - Remove highlighting.
:PyCoverageRemove - Remove highlighting and delete .coverage file.
:PyCoverageSetQuickfix - Set the quickfix list to missing lines.
:PyCoverageSetLoclist - Set the window's location list to the missing lines.
PyCoverageMissingLines(buffer) - Return missing line numbers for the given buffer as a List.