No commit activity in last 3 years
No release in over 3 years
Provides step definitions to spawn and command a vim instance
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 1.0.2
 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.

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.