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 be1
) - 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 missing. (Default mapping:<Leader>sps
)
Options
Put any of the following options into your ~/.vimrc
in order to overwrite the default behaviour.
Option | Default | Description |
---|---|---|
g:phpspec_executable |
Auto-detect | Path to phpspec executable |
g:phpspec_default_mapping |
1 | Set to 0 to disable default key-mappings |
Credits & Contribution
Inspiration:
This plugin was developed by Rafael Bodill under the MIT License.