Ⅰ. 插件描述
VIM plugin for running a single ruby test under the cursorⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'dmcinnes/ruby-single-test'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'dmcinnes/ruby-single-test'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'dmcinnes/ruby-single-test'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/dmcinnes/ruby_single_test
Ⅳ. 文档说明
RubySingleTest
VIM plugin for running a single Ruby test under the cursor.
Supports Test::Unit, Rspec and Minitest.
When editing a Ruby test file, hit<leader>.
and the test the cursor is over, and only that test, will run in quickfix.
That's it!
(<leader> is usually \ or , so the command would be \. or ,.)
To remap the command, to <leader>t for instance, add something
like this to your .vimrc:nmap <silent> <leader>t <Plug>ExecuteRubyTest
Ruby Single Test default to using make! with a bang. To disable
this behavior drop this in your .vimrc:let g:ruby_single_test_no_bang = 1
You will need to set the appropiate makeprg for this to work.