Ⅰ. 插件描述
Code smell detector for Ruby in VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'rainerborene/vim-reek'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'rainerborene/vim-reek'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'rainerborene/vim-reek'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/rainerborene/vim-reek
Ⅳ. 文档说明
# reek.vim
Code smell detector for Ruby in Vim.
Reek is a tool that examines Ruby
classes, modules and methods and reports any code smells it finds.
Usage
Open any Ruby file and you will be able to see the messages using the location
list (e.g. by invoking :lopen or :ll). See more about location using :help location-list or see the
online documention.
Configuration
Always Show
By default, any messages are shown when a file is loaded or saved. If you want
to only show messages when you open the location list, set the following in your.vimrc file:
let g:reek_always_show = 0
By default, messages are always shown.
Line Limit
Checking large files (> 1000 lines) can take a while.
To load larger files quicker, you can limit maximum number of lines a file can
have and still be checked. Files bigger than this limit will not be checked:
let g:reek_line_limit = 1000
With no line limit set, all files will be checked.
Check on demand
To only check files on demand, set:
let g:reek_on_loading = 0
And then, to check the currently displayed file, call:
:RunReek
Location list will open in a new buffer.
Installation
Place the plugin/reek.vim file in your .vim/plugin directory.
Please make sure that reek is up-to-date.
This plugin is also compatible with
pathogen.
Integration can be implemented similar to
syntastic (where you also can find
a nice set-up guide in the README)
License
Copyright (c) Rainer Borene. Distributed under the same terms as Vim itself. See:help license.