ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Gherkin Auto-Complete Plus

by austincrft ST3

Gherkin Auto-Complete Plus is a Sublime Text plugin that will catalog Gherkin steps from the *.feature files of the provided directory, and provide autocomplete suggestions based on the catalogued steps.

Details

Installs

  • Total 14K
  • Win 8K
  • Mac 4K
  • Linux 2K
Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10
Windows 2 2 0 0 0 0 3 2 1 0 1 0 0 0 0 2 2 0 0 1 0 0 0 1 1 0 1 1 1 3 0 1 1 0 0 1 0 0 0 1 0 1 1 1 1
Mac 0 0 1 1 0 0 1 0 0 0 0 1 1 0 1 2 0 1 0 0 1 0 0 2 0 2 0 0 0 0 0 0 0 2 0 2 0 3 0 0 0 0 0 0 1
Linux 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
01234Mar 26Mar 23Mar 20Mar 17Mar 14Mar 11Mar 8Mar 5Mar 2Feb 27Feb 24Feb 21Feb 18Feb 15Feb 12Mar 26 Linux: 0 Mac: 0 Windows: 2Mar 25 Linux: 1 Mac: 0 Windows: 2Mar 24 Linux: 0 Mac: 1 Windows: 0Mar 23 Linux: 0 Mac: 1 Windows: 0Mar 22 Linux: 1 Mac: 0 Windows: 0Mar 21 Linux: 0 Mac: 0 Windows: 0Mar 20 Linux: 0 Mac: 1 Windows: 3Mar 19 Linux: 0 Mac: 0 Windows: 2Mar 18 Linux: 0 Mac: 0 Windows: 1Mar 17 Linux: 0 Mac: 0 Windows: 0Mar 16 Linux: 0 Mac: 0 Windows: 1Mar 15 Linux: 0 Mac: 1 Windows: 0Mar 14 Linux: 0 Mac: 1 Windows: 0Mar 13 Linux: 0 Mac: 0 Windows: 0Mar 12 Linux: 0 Mac: 1 Windows: 0Mar 11 Linux: 0 Mac: 2 Windows: 2Mar 10 Linux: 0 Mac: 0 Windows: 2Mar 9 Linux: 0 Mac: 1 Windows: 0Mar 8 Linux: 0 Mac: 0 Windows: 0Mar 7 Linux: 0 Mac: 0 Windows: 1Mar 6 Linux: 0 Mac: 1 Windows: 0Mar 5 Linux: 0 Mac: 0 Windows: 0Mar 4 Linux: 0 Mac: 0 Windows: 0Mar 3 Linux: 0 Mac: 2 Windows: 1Mar 2 Linux: 0 Mac: 0 Windows: 1Mar 1 Linux: 1 Mac: 2 Windows: 0Feb 28 Linux: 0 Mac: 0 Windows: 1Feb 27 Linux: 0 Mac: 0 Windows: 1Feb 26 Linux: 0 Mac: 0 Windows: 1Feb 25 Linux: 0 Mac: 0 Windows: 3Feb 24 Linux: 0 Mac: 0 Windows: 0Feb 23 Linux: 0 Mac: 0 Windows: 1Feb 22 Linux: 0 Mac: 0 Windows: 1Feb 21 Linux: 0 Mac: 2 Windows: 0Feb 20 Linux: 0 Mac: 0 Windows: 0Feb 19 Linux: 0 Mac: 2 Windows: 1Feb 18 Linux: 0 Mac: 0 Windows: 0Feb 17 Linux: 0 Mac: 3 Windows: 0Feb 16 Linux: 1 Mac: 0 Windows: 0Feb 15 Linux: 0 Mac: 0 Windows: 1Feb 14 Linux: 0 Mac: 0 Windows: 0Feb 13 Linux: 0 Mac: 0 Windows: 1Feb 12 Linux: 0 Mac: 0 Windows: 1Feb 11 Linux: 0 Mac: 0 Windows: 1Feb 10 Linux: 0 Mac: 1 Windows: 1Mar 26 Linux: 0 Mac: 0 Windows: 2Mar 25 Linux: 1 Mac: 0 Windows: 2Mar 24 Linux: 0 Mac: 1 Windows: 0Mar 23 Linux: 0 Mac: 1 Windows: 0Mar 22 Linux: 1 Mac: 0 Windows: 0Mar 21 Linux: 0 Mac: 0 Windows: 0Mar 20 Linux: 0 Mac: 1 Windows: 3Mar 19 Linux: 0 Mac: 0 Windows: 2Mar 18 Linux: 0 Mac: 0 Windows: 1Mar 17 Linux: 0 Mac: 0 Windows: 0Mar 16 Linux: 0 Mac: 0 Windows: 1Mar 15 Linux: 0 Mac: 1 Windows: 0Mar 14 Linux: 0 Mac: 1 Windows: 0Mar 13 Linux: 0 Mac: 0 Windows: 0Mar 12 Linux: 0 Mac: 1 Windows: 0Mar 11 Linux: 0 Mac: 2 Windows: 2Mar 10 Linux: 0 Mac: 0 Windows: 2Mar 9 Linux: 0 Mac: 1 Windows: 0Mar 8 Linux: 0 Mac: 0 Windows: 0Mar 7 Linux: 0 Mac: 0 Windows: 1Mar 6 Linux: 0 Mac: 1 Windows: 0Mar 5 Linux: 0 Mac: 0 Windows: 0Mar 4 Linux: 0 Mac: 0 Windows: 0Mar 3 Linux: 0 Mac: 2 Windows: 1Mar 2 Linux: 0 Mac: 0 Windows: 1Mar 1 Linux: 1 Mac: 2 Windows: 0Feb 28 Linux: 0 Mac: 0 Windows: 1Feb 27 Linux: 0 Mac: 0 Windows: 1Feb 26 Linux: 0 Mac: 0 Windows: 1Feb 25 Linux: 0 Mac: 0 Windows: 3Feb 24 Linux: 0 Mac: 0 Windows: 0Feb 23 Linux: 0 Mac: 0 Windows: 1Feb 22 Linux: 0 Mac: 0 Windows: 1Feb 21 Linux: 0 Mac: 2 Windows: 0Feb 20 Linux: 0 Mac: 0 Windows: 0Feb 19 Linux: 0 Mac: 2 Windows: 1Feb 18 Linux: 0 Mac: 0 Windows: 0Feb 17 Linux: 0 Mac: 3 Windows: 0Feb 16 Linux: 1 Mac: 0 Windows: 0Feb 15 Linux: 0 Mac: 0 Windows: 1Feb 14 Linux: 0 Mac: 0 Windows: 0Feb 13 Linux: 0 Mac: 0 Windows: 1Feb 12 Linux: 0 Mac: 0 Windows: 1Feb 11 Linux: 0 Mac: 0 Windows: 1Feb 10 Linux: 0 Mac: 1 Windows: 1Mar 26 Linux: 0 Mac: 0 Windows: 2Mar 25 Linux: 1 Mac: 0 Windows: 2Mar 24 Linux: 0 Mac: 1 Windows: 0Mar 23 Linux: 0 Mac: 1 Windows: 0Mar 22 Linux: 1 Mac: 0 Windows: 0Mar 21 Linux: 0 Mac: 0 Windows: 0Mar 20 Linux: 0 Mac: 1 Windows: 3Mar 19 Linux: 0 Mac: 0 Windows: 2Mar 18 Linux: 0 Mac: 0 Windows: 1Mar 17 Linux: 0 Mac: 0 Windows: 0Mar 16 Linux: 0 Mac: 0 Windows: 1Mar 15 Linux: 0 Mac: 1 Windows: 0Mar 14 Linux: 0 Mac: 1 Windows: 0Mar 13 Linux: 0 Mac: 0 Windows: 0Mar 12 Linux: 0 Mac: 1 Windows: 0Mar 11 Linux: 0 Mac: 2 Windows: 2Mar 10 Linux: 0 Mac: 0 Windows: 2Mar 9 Linux: 0 Mac: 1 Windows: 0Mar 8 Linux: 0 Mac: 0 Windows: 0Mar 7 Linux: 0 Mac: 0 Windows: 1Mar 6 Linux: 0 Mac: 1 Windows: 0Mar 5 Linux: 0 Mac: 0 Windows: 0Mar 4 Linux: 0 Mac: 0 Windows: 0Mar 3 Linux: 0 Mac: 2 Windows: 1Mar 2 Linux: 0 Mac: 0 Windows: 1Mar 1 Linux: 1 Mac: 2 Windows: 0Feb 28 Linux: 0 Mac: 0 Windows: 1Feb 27 Linux: 0 Mac: 0 Windows: 1Feb 26 Linux: 0 Mac: 0 Windows: 1Feb 25 Linux: 0 Mac: 0 Windows: 3Feb 24 Linux: 0 Mac: 0 Windows: 0Feb 23 Linux: 0 Mac: 0 Windows: 1Feb 22 Linux: 0 Mac: 0 Windows: 1Feb 21 Linux: 0 Mac: 2 Windows: 0Feb 20 Linux: 0 Mac: 0 Windows: 0Feb 19 Linux: 0 Mac: 2 Windows: 1Feb 18 Linux: 0 Mac: 0 Windows: 0Feb 17 Linux: 0 Mac: 3 Windows: 0Feb 16 Linux: 1 Mac: 0 Windows: 0Feb 15 Linux: 0 Mac: 0 Windows: 1Feb 14 Linux: 0 Mac: 0 Windows: 0Feb 13 Linux: 0 Mac: 0 Windows: 1Feb 12 Linux: 0 Mac: 0 Windows: 1Feb 11 Linux: 0 Mac: 0 Windows: 1Feb 10 Linux: 0 Mac: 1 Windows: 1

Readme

Source
raw.​githubusercontent.​com

Gherkin Auto-Complete Plus

Build Status Join the chat at https://gitter.im/austincrft/sublime-gherkin-auto-complete-plus

This is a Sublime Text auto-complete package for use with Cucumber's Gherkin language. This package will catalog Gherkin step definitions from the *.feature files of the selected directories and provide auto-complete suggestions based on the catalogued steps.

Examples

Auto-Complete

auto_complete

Fuzzy-searching steps

example

Usage Info

This package is only compatible with Sublime Text 3. It will not work on Sublime Text 2. - Any folders open in Sublime Text will be searched recursively for *.feature files. You can specify additional directories via the package's settings file (Note: There is an option to use only these directories). - Step catalog is updated when the package loads or on the save of a *.feature file - This package relies on the first word of the line being a keyword (Given, When, Then) in order to give auto-complete suggestions. If a keyword is not found on the current line, the previous one will be used. - If the first word on a line is an asterisk (*), that step will show up under all other step types - It is not recommended that this is used alongside cucumber-sublime-bundle, as the bundled auto-complete will interfere with the results. At the moment, I've included the Gherkin syntax files so that this package can be self-contained. I have tried contacting the owner of that bundle, but he is not an easy man to reach.

Options/Settings

The settings file for this package can be accessed from the toolbar via Preferences -> Package Settings -> Gherkin Auto-Complete Plus -> Settings - User (Note: You can open Settings - Default as a reference)

{
    // A collection of ADDITIONAL directories containing the features files you would like to scan
    // The directories listed here will be scanned IN ADDITION to the folder(s) open in Sublime Text
    "feature_file_directories":
    [
        "path/to/feature/files/directory",
        "some/path/to/different/feature/files/directory"
    ],

    // When this is set to true, the open directories in Sublime Text will be ignored, and only
    // the directories listed in the `feature_file_directories` option will be used
    "ignore_open_directories": false,

    // Logging for execution information -- this will output to the Sublime Text Console
    // You can view the console by going to the toolbar and selecting `View -> Show Console`
    // Valid options:
    // DEBUG - Detailed information for debugging
    // INFO - Confirmation that things are working as expected
    // WARNING - An indication something might fail in the future
    // ERROR - An error occurred, likely a recoverable one
    // CRITICAL - A non-recoverable error -- execution will stop
    "logging_level": "error"
}

Why did you create a new Gherkin Auto-Complete package instead of contributing to the existing one?

Short answer: There were a lot of changes I wanted to make, and felt it warranted a new package.

Differences: - The auto-complete suggestions will pop up as you type – no need to open manually - Pressing space does not automatically commit the highlighted suggestion, so it shouldn't interrupt your workflow - Only gives suggestions for current step-type (if the line starts with Given, then only Given steps will be suggested) - Steps are formatted in snippet-notation to allow tabbing to values - Table rows are not catalogued, which are unlikely to be duplicated exactly - Values in between quotes (single and double), less- and greater-than signs, and numbers in 'integer' and 'decimal' format are ignored to remove duplicates from the step list

Isn't the name 'Gherkin Auto-Complete Plus' a bit arrogant?

Absolutely, yes. It's intended to be tongue-in-cheek, but also I couldn't think of a better name. :smirk:

Installation

Automatic - via Package Control

Search for 'Gherkin Auto-Complete Plus'

Mac OSX

cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
git clone https://github.com/austincrft/sublime-gherkin-auto-complete-plus.git "Gherkin Auto-Complete Plus"

Linux

cd ~/.config/sublime-text-3/Installed\ Packages
git clone https://github.com/austincrft/sublime-gherkin-auto-complete-plus.git "Gherkin Auto-Complete Plus"

Windows

cd "C:\Users\<user>\AppData\Roaming\Sublime Text 3\Installed Packages"
git clone https://github.com/austincrft/sublime-gherkin-auto-complete-plus.git "Gherkin Auto-Complete Plus"

Credits

The accompanied *.tmLanguage files were taken from @drewda's cucumber-sublime-bundle repository.