vim-mrspec


Ⅰ. 插件描述

RSpec inside VIM with :make

Ⅱ. 基本信息

创建日期:  2017-06-22
使用用户:  1
Github星:  3
插件作者:  Pablo Bender

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'pablobender/vim-mrspec'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'pablobender/vim-mrspec'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'pablobender/vim-mrspec'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/pablobender/vim-mrspec

Ⅳ. 文档说明

# MRSpec

A simple Vim plugin to execute RSpec through :make command.

Motivation

Run rspec inside Vim and ouptut of failing specs into quickfix window (:cwindow). Also be able to run the spec/context/describe where the cursor is.

Features/Usage

To run the nearest spec/context/describe where the cursor is.

:MRSpecLine

To run specs for the current spec file.

:MRSpecFile

To run all specs.

:MRSpecAll

To re-execute the last spec location (line, file or all). It can be called out of a spec file. Useful when you fix a failing spec in production source file.

:MRSpec

Tips

If you think the commands too long or would like another commands, just put something like below into your ~/.vimrc file.

command RL call mrspec#RunLine()
command RF call mrspec#RunFile()
command RA call mrspec#RunAll()
command R call mrspec#Run()

Now you can simple execute :RL, :RF, RA and :R to run each function, respectively.

Installation

You may install as you prefer. I like Vundle.

Put it into your Vundle configuration:

Bundle "pablobender/vim-mrspec.git"

If you use pathogen as plugin manager, just unpack or clone the repository in your ~/.vim/bundle dir (creating a subfoler, eg: ~/.vim/bundle/vim-mrspec).

But if you don't use a plugin manager, you can download the source code and put it into your ~/.vim. Make sure to put the contents of vim-mrspec folder into your ~/.vim, not create a new vim-mrspec under it.

Requirements

MRSpec is a pure vimscript plugin, but only make sense if you are working on ruby/rspec project. So you need be able to run rspec on your terminal for your project.

License

MIT

添加新评论