Gherkin (Cucumber) Formatter
Gherkin Formatter for Sublime Text 2 and 3
Details
Installs
- Total 29K
- Win 10K
- Mac 14K
- Linux 6K
May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | Apr 24 | Apr 23 | Apr 22 | Apr 21 | Apr 20 | Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 2 | 1 | 0 | 0 | 3 | 0 | 0 | 2 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 0 | 0 | 2 | 0 |
Mac | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 2 | 2 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
Readme
- Source
- raw.githubusercontent.com
Sublime Gherkin Formatter
Features
At this stage all it really does is format example group tables. The entire buffer will be formatted unless you select a specific region.
Spacing
Tables that look like this:
|cat breeds|country|
|Manx|Isle of Man|
|Octocat|The Web|
Will be reformatted to:
| cat breeds | country |
| Manx | Isle of Man |
| Octocat | The Web |
Indentation
Usually, people like to indent their tables from the rest of the text. This plugin respects the first line of the group's indent. So the following:
Then the "<cat breed>" is from "<country>"
| cat breeds | country |
| Manx | Isle of Man |
| Octocat | The Web |
Will be indented to:
Then the "<cat breed>" is from "<country>"
| cat breeds | country |
| Manx | Isle of Man |
| Octocat | The Web |
Installing
Package control
You can now install this plugin using Sublime Package Control.
- Open Command Palette (
<Cmd> + <Shift> + P
on a Mac, or access via Tools menu) - Find and select “Package Control: Install Package”
- Find and install “Gherkin (Cucumber) Formatter”
Manual
You can install this plugin manually by cloning it to your Sublime plugins directory:
$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
$ git clone git://github.com/waynemoore/sublime-gherkin-formatter.git
Usage
There are a few ways to use it:
<Cmd> + <Shift> + |
- This matches the TextMate cucumber plugin's key binding.<Ctrl> + <Alt> + G
- DEPRECATED. Original key binding still set to avoid surprise when upgrading the plugin.- Select “Gherkin/Cucumber: Format” from the Command Palette.
Contributing
It's a Python project, so I recommend you make use of virtualenv to manage dependencies.
- Clone repository
$ pip install -r requirements.pip
$ nosetests
- Write a test
- Implement your feature / bugfix
- Open a pull request