Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'emilford/vim-sweeter-vest'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'emilford/vim-sweeter-vest'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'emilford/vim-sweeter-vest'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/emilford/vim-sweeter-vest
Ⅳ. 文档说明
# SweeterVest

Like @tpope's dotfiles, here be dragons.
This is as much an exercise in creating my first vim plugin, learning vimscript, and testing with vimrunner as it is extracting something from my test flow for coworkers to use. Bottom line, this is experimental. Use at your own risk, especially if you work in Test::Unit.
Installation
I personally use Vundle after years with Pathogen. Both are great plugins that offer documentation on how to install vim-sweeter-vest. That said, I have only ever tested installation with Vundle.
Getting Started
All commands are run through tpope's vim-dispatch when availabl. The plugin creates the following commands:
:SweeterVestRunTestRuns the current test relative to the current line when the command is executed.
:SweeterVestRunFileRuns all tests available in the current file.
:SweeterVestRunAllRuns rake when a Rakefile is present. Otherwise, runs available tests.
:SweeterVestRunLastRuns the last command successfully executed by SweeterVest.
:SweeterVestRunContextFor RSpec, runs all tests in the nearest parent describe or context block. For Cucumber, runs the nearest parent scenario. Test::Unit has not yet been implemented.
:SweeterVestRunFeaturesRuns all flavors of feature files depending on what's available, including cucumber features and spec/features and spec/acceptance files
:SweeterVestRSpecSeed <seed>Run RSpec commands with a specific seed. The seed is cleared after each run. Protip: Use SweeterVestRunLast to continuously run a command with a given seed.
The following mappings are provided by default:
nnoremap <leader>rt :SweeterVestRunTest<cr>
nnoremap <leader>rf :SweeterVestRunFile<cr>
nnoremap <leader>ra :SweeterVestRunAll<cr>
nnoremap <leader>rl :SweeterVestRunLast<cr>
nnoremap <leader>rc :SweeterVestRunContext<cr>
nnoremap <leader>rF :SweeterVestRunFeatures<cr>
nnoremap <leader>rs :SweeterVestRSpecSeed
nnoremap <leader>rv :SweeterVestToggleVimux<cr>
nnoremap <leader>rd :SweeterVestToggleDispatch<cr>