Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Gherkin Syntax Highlight and FormatterNew to Visual Studio Code? Get it now.
Gherkin Syntax Highlight and Formatter

Gherkin Syntax Highlight and Formatter

korostylov

|
2,312 installs
| (0) | Free
Feature Syntax Highlight and Formatter (Cucumber/Gherkin)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Gherkin Syntax Highlight and Formatter

Description

This extension provides Gherkin syntax highlight and formatting for ".feature" and ".md" files to enhance productivity (and make ".feature" and ".md" files look pretty).

Highlights

Highlights keywords including:

  • Scenario /Outline
  • Example /Outline
  • Feature / Business Need / Ability
  • Rule
  • Background
  • Given
  • When
  • Then
  • And
  • But
  • Examples
  • @tags
  • #comments
  • numbers
  • <variables>
  • **bold text**
  • strings (" ", ' ', ` `) / docstring (""" """)

Automatic closing pairs for symbols:

  • { }
  • [ ]
  • ( )
  • < >
  • " "
  • ' '
  • ` `

Automatic surrounding pairs for symbols:

  • { }
  • [ ]
  • ( )
  • < >
  • " "
  • ' '
  • ` `
  • * *
  • _ _

Formatter

Format Document or Format Selection options are available. Format Selection will format entire document instead of selection.

Settings

You can put settings in the .workspace or .vscode file of your projects, so all your team will get them.

Indentation

Setting Description Default Value
Format On Save Enables autoformatting when saving document false
Indent Symbol What indentation symbol to use ('tab' or 'space') space
Indent Offset Free Text How many indentation symbols to insert before free text. Relative to the parent keyword. 4
Indents Before: Feature How many indentation symbols to insert before 'Feature' / 'Business Need' / 'Ability' 0
Indents Before: Rule How many indentation symbols to insert before 'Rule' 4
Indents Before: Background How many indentation symbols to insert before 'Background' 4
Indents Before: Scenario How many indentation symbols to insert before 'Scenario' / 'Example' 4
Indents Before: Scenario Outline How many indentation symbols to insert before 'Scenario Outline' 4
Indents Before: Examples How many indentation symbols to insert before 'Examples' / 'Scenario' 4
Indents Before: Given How many indentation symbols to insert before 'Given' 8
Indents Before: When How many indentation symbols to insert before 'When' 8
Indents Before: Then How many indentation symbols to insert before 'Then' 8
Indents Before: And How many indentation symbols to insert before 'And' 12
Indents Before: But How many indentation symbols to insert before 'But' 12

Known issues

Format Selection will format entire document instead of selection.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft