Ⅰ. 插件描述
A Simple way to display gcov coverate within vimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'm42e/vim-gcov-marker'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'm42e/vim-gcov-marker'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'm42e/vim-gcov-marker'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/m42e/vim-gcov-marker
Ⅳ. 文档说明
#gcov-marker
This plugin provides a simple way to load and reload gcov files for an open
source file. It will highlight the covered and uncovered lines and publish
the uncovered lines to the location list.
It does not show you detailed information about the coverage at the moment so
you do not get detailed information like the number of hits or branches.
Install
- Copy plugin/gcov_marker.vim to ~/.vim/plugin
- Copy autoload/gcov_marker.vim to ~/.vim/autoload
- Copy syntax/gcov_marker.vim to ~/.vim/syntax
- Copy doc/gcov_marker.vim to ~/.vim/doc
Usage
In the window of your source file, run command
:GcovLoad source.gcov
If g:gcov_marker_path contains a folder with all your .gcov files, run
:GcovFind
Configuration
Default markers can be customized using the variables below.
let g:gcov_marker_covered = '✓'
let g:gcov_marker_uncovered = 'X'The GcovFind command needs to know where to look for the .gcov files.
The variable takes a comma seperated list of folders.
let g:gcov_marker_path = 'path/to/gcov/files/'By default, the plugin opens the location list once uncovered lines are
- This behavior can be changed by setting the global variable below.
Note that the uncovered lines will always be published to the location list.
let g:gcov_marker_auto_lopen = 0Command :lopen can be used to display the list of uncovered lines in the location list.