https://github.com/andrewradev/cucumber-vimscript
Cucumber step definitions for testing vimscript
https://github.com/andrewradev/cucumber-vimscript
Last synced: 5 months ago
JSON representation
Cucumber step definitions for testing vimscript
- Host: GitHub
- URL: https://github.com/andrewradev/cucumber-vimscript
- Owner: AndrewRadev
- License: mit
- Created: 2011-10-28T20:12:55.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-09-23T12:53:16.000Z (over 12 years ago)
- Last Synced: 2024-04-25T04:22:51.289Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 109 KB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This project contains step definitions that can be used to spawn a Vim instance
and control it through code. The actual work is done by the
[vimrunner gem](https://github.com/AndrewRadev/vimrunner).Here's an example feature from my plugin
[splitjoin](https://github.com/AndrewRadev/splitjoin.vim):Feature: CSS support
Scenario: Splitting single-line style definitions
Given Vim is running
And the splitjoin plugin is loaded
And I'm editing a file named "example.css" with the following contents:
"""
h2 { font-size: 18px; font-weight: bold }
"""
And the cursor is positioned on "h2"
And "expandtab" is set
And "shiftwidth" is set to "2"
When I split the line
And I save
Then the file "example.css" should contain the following text:
"""
h2 {
font-size: 18px;
font-weight: bold;
}
"""It's a bit verbose, but it's work in progress.
For now, there are only a few steps in `lib/cucumber/vimscript.rb`. I'll add
more and organize them as I attempt to use this project for testing some of my
own scripts. Any contributions are more than welcome, though.