vim-phpspec


Ⅰ. 插件描述

Vim PhpSpec integration which reads phpspec.yml

Ⅱ. 基本信息

创建日期:  2014-09-28
使用用户:  2
Github星:  5
插件作者:  Rafael Bodill

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-phpspec

Vim PhpSpec integration which reads phpspec.yml file from current-working
directory.

Features

  • Reads phpspec.yml
  • Switch to spec/class
  • Run current/all specs
  • Uses vimproc if available
  • Tiny. ~200LoC

Dependencies

  • vim +python - Verify with :echo has('python') (output should be 1)
  • [python2-yaml]

Installation

Use your favorite plugin manager.

Commands

  • :PhpSpecRun - Runs all spec suites. (_Default mapping:_ <Leader>spr)
  • :PhpSpecRunCurrent - Runs current spec. (_Default mapping:_ <Leader>spc)
  • :PhpSpecSwitch - Switch to spec or class file, confirms spec creation if

    1. (_Default mapping:_ <Leader>sps)

Options

Put any of the following options into your ~/.vimrc in order to overwrite the default behaviour.

OptionDefaultDescription
g:phpspec_executableAuto-detectPath to phpspec executable
g:phpspec_default_mapping1Set to 0 to disable default key-mappings

Credits & Contribution

Inspiration:

  • [Herzult/phpspec-vim]
  • [shawncplus/phpcomplete.vim]

This plugin was developed by Rafael Bodill under the [MIT License].

添加新评论