Ⅰ. 插件描述
Lighting fast Ruby test runner for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'emilsoman/test-runner-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'emilsoman/test-runner-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'emilsoman/test-runner-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/emilsoman/test-runner.vim
Ⅳ. 文档说明
test-runner.vim
Features
- Uses zeus to run tests ( if zeus is running ).
- Works with binstubs if you're using spring
- Defaults to "bundle exec" if no zeus or binstubs available
- Zero-config integration with
vimuxto run tests parallelly in a tmux pane. - Works with RSpec and Cucumber.
Usage
Install the plugin (See Installation section) and add the following
keyboard shortcuts in your ~/.vimrc :
map <unique> <silent> <Leader>R :call TestRunnerRunAllTests()<CR>
map <unique> <silent> <Leader>r :call TestRunnerRunCurrentTest()<CR>Whenever you want to run all the tests in a file, press <Leader>R and if you
want to run the innermost test w.r.t current cursor position, press <Leader>r.
Installation
This plugin follows the standard runtime path structure, and as such it can be installed with a variety of plugin managers:
Pathogen
git clone https://github.com/emilsoman/test-runner.vim ~/.vim/bundle/test-runner.vim
NeoBundle
NeoBundle 'emilsoman/test-runner.vim'
Vundle
Plugin 'emilsoman/test-runner.vim'
manual
- copy all of the files into your
~/.vimdirectory
- copy all of the files into your
License
MIT License. Copyright (c) 2015 Emil Soman