vim-quickrun-phpunit


Ⅰ. 插件描述

Ⅱ. 基本信息

创建日期:  2012-04-07
使用用户:  9
Github星:  2
插件作者:  Yosuke Karasawa

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Description

vim-quickrun-phpunit is outputter of vim-quickrun plugin.

You can output to the command line the result of running the PHPUnit.
Result message will be green and red coloring.

If PHPUnit test case is failure, result message is output to the location-list.
You can jump to the error from the location-list.

Install

Please put your vim's runtimepath this plugin files.

Example

  • ~/.vim/autoload/quickrun/outputter/phpunit.vim
  • ~/.vim/bundle/vim-quickrun-phpunit/autoload/quickrun/outputter/phpunit.vim

Please install vim-quickrun Version 0.5.1(or later) before use this plugin.
https://github.com/thinca/vim-quickrun

How to use

Example of .vimrc

augroup QuickRunPHPUnit
  autocmd!
  autocmd BufWinEnter,BufNewFile *Test.php set filetype=phpunit
augroup END

let g:quickrun_config['phpunit'] = {}
let g:quickrun_config['phpunit']['outputter'] = 'phpunit'
   
let g:quickrun_config['phpunit']['command'] = 'phpunit'
let g:quickrun_config['phpunit']['cmdopt'] = ''
let g:quickrun_config['phpunit']['exec'] = '%c %o %s'

Option settings

let g:quickrun_config['phpunit']['outputter/phpunit/running_mark'] = 'running...'
let g:quickrun_config['phpunit']['outputter/phpunit/height'] = 3
let g:quickrun_config['phpunit']['outputter/phpunit/auto_open'] = 0

添加新评论