Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Cucumber step definitions for testing vimscript

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 _project.vim
Octocat-spinner-32 cucumber-vimscript.gemspec
README.md

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.

Here's an example feature from my plugin splitjoin:

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.

Something went wrong with that request. Please try again.