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

Cucumber Step Finder

by danielfrey ALL

A plugin for sublime providing easy navigation to steps in Cucumber (http://cukes.info)

Details

  • 0.3.6
  • github.​com
  • github.​com
  • 10 years ago
  • 40 minutes ago
  • 12 years ago

Installs

  • Total 8K
  • Win 2K
  • Mac 4K
  • Linux 2K
Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8
Windows 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 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
Linux 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Sublime Text 2/3 plugin: Cucumber Step Finder

This plugin supports Rails developers to easily navigate to their cucumber (http://cukes.info) steps.

It provides by now two commands

  • One listing all steps in the open project and letting you choose a step using the built-in mechanism for search.
  • The second one letting you jump to the corresponding step by calling the “MatchStep”-Command when standing on a step in the features file

Installation

Mac OSX (manual)

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git://github.com/danielfrey/sublime-cucumber-step-finder.git CucumberStepFinder

Linux/Windows

Not tested yet. Contributions are welcome. If keyboard settings are provided, it should work.

Package Control

Installation through package control is recommended. It will handle updating your packages as they become available. To install, do the following.

  • In the Command Palette, enter Package Control: Install Package
  • Search for CucumberStepFinder

Usage

The default key-binding for “search” is super + y (ctrl + alt + y), respectively ctrl + super + m (ctrl + shift + m) for “match”. Change it if one is already used in your configuration

Alternatively super+click the line in a features file to find it's definition (OSX)

Configuration

The following settings are available so far.

{
   "open_in_different_pane"  :  true,
   "cucumber_features_path"  :  "features",
   "cucumber_step_pattern"   :  ".*_steps.*\\.rb",
   "cucumber_code_keywords"  :  ["given", "when", "then", "and","but", "und", "dann", "wenn", "gegeben sei", "angenommen"]
}

The plugin looks for cucumber_features_path as a direct subdirectory of your project as it's the default in Rails projects. Override this setting if your steps are located in a different subdirectory.

In the given features directory it uses the second setting for finding step-files recursively matching the cucumber_step_pattern

For finding the matching step, CucumberStepFinder needs to know which are the cucumber-keywords. Since there are different keywords beside English, you can configure them in cucumber_code_keywords. By default English and German are predefined.

To find out, which keywords to configure e.g. German (language code de), type

cucumber --i18n de

into the console. The last argument is the language code. Add all words marked with “code” to the settings.

The option “open_in_different_pane” lets you define, whether the steps file is opened in a different pane or not. For those working with a single pane only, switch this flag to false.

Project Specific Configuration

These settings can be changed globally, or in your .sublime-project file.

"settings":
{
  "CucumberStepFinder":
  {
    "cucumber_step_pattern": ".*\\.rb"
  }
}