Ⅰ. 插件描述
Utility for code reviews (using quickfix)Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/codereviewer-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/codereviewer-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/codereviewer-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/CodeReviewer.vim
Ⅳ. 文档说明
If you do code reviews on a regular basis, this script could be of help to you. This tip is about -
- Helping the reviewer review code
- Helping the author in collating reviews from various peers
- Helping the author in fixing the review comments
Typical review session:
- A reviewer open the code to review, positions the cursor on the line he/she wants to comment on and types "ic" - this puts the file name, the line number, the reviewer's initials and the defect type in the review file
- The comment is typed next to the line number and can span multiple lines
- Send the comments to the author of the code
- The author collates the inputs from various reviewers into one file (by simply concatenating them) and sorts it. Now the comments are arranged per file, in the order of line numbers (in a file called say, all_comments.txt)
- Using the :cfile all_comments.txt (or :CheckReview) the author can now navigate through all the comments.
This script is based on vimtip #761. Thanks to all for feedback! Specifically to Salman for providing an implementation for automating the step between saving position in the file being reviewed and inserting a comment in the review file.