Ⅰ. 插件描述
A vim plugin for creating and launching testsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'adrianschneider/vim-tdd'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'adrianschneider/vim-tdd'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'adrianschneider/vim-tdd'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/adrianschneider/vim-tdd
Ⅳ. 文档说明
# Overview
This plugin aids test-driven development by allowing you to run tests in tmux panes without getting in the way. This is by no means a full solution, but should provide a framework to create a workflow that fits your needs.
Installation
Pathogen:
cd ~/.vim/bundle
git clone git://github.com/AdrianSchneider/vim-tdd.git
Vundle:
Bundle 'AdrianSchneider/vim-tdd'
Features
- run tests synchronously in vim, or asynchronously through tmux
- run tests manually or automatically on save
- open (and create) test in split
- add other related files to test list
- auto detect bottom tmux pane, or override with config
Language Configuration
Basic PHP and Javascript support is included. Each language must configure g:tdd_test_command, and g:tdd_map_callback. See included ones as an example.
Basic Usage
<leader>ts opens test in split <leader>tt add current file to auto-test list <leader>t- empty auto-test list <leader>ti test file directly in vim
Documentation
Run :help tdd to see more advanced usage and configuration options.