vim-rspec


Ⅰ. 插件描述

Vim script to run the spec command

Ⅱ. 基本信息

创建日期:  2009-03-03
使用用户:  1
Github星:  3
插件作者:  Eugene Korbut

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'vlmonk/vim-rspec-back-to-december'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'vlmonk/vim-rspec-back-to-december'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'vlmonk/vim-rspec-back-to-december'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Vim with Rspec

INSTALL

This plugin make easy to run the spec command inside Vim. You need Hpricot (http://wiki.github.com/why/hpricot)
OR xsltproc (http://www.xmlsoft.org/XSLT/xsltproc2.html) and grep (http://www.gnu.org/software/grep) to use it.
Hpricot takes precedence over xsltproc.
There are four files on the package: the Vim script, the Ruby script, the XSL file and the syntax file.

To install, unpack the files on your ~/.vim directory and source it to make it available. You
can also use the Makefile to install the files, just type:
make install

USAGE

There are two commands available:

You can run RunSpec and spec will run with the current file (if it's a *_spec.rb file)
You can run RunSpecs and spec will run with all the files inside the spec directory.

After some of the commands above runs, it will open a new window with the result, where you can click on the error
lines where there's a file path with the line number and it will open on a new window, moving the cursor to the
line where the error is.

Of course, you can create some mappings to make easier to call the commands.

添加新评论