Gherkin (Cucumber) Formatter
Gherkin Formatter for Sublime Text 2 and 3
Details
Installs
- Total 29K
- Win 10K
- Mac 13K
- Linux 5K
Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | 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 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 | 0 |
Linux | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 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