Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Ruby ERB::FormatterNew to Visual Studio Code? Get it now.
Ruby ERB::Formatter

Ruby ERB::Formatter

Elia Schito

|
26,503 installs
| (6) | Free
Format ERB files with speed and precision.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ERB::Formatter 🪜 (for VSCode)

VSCode extension for the ERB::Formatter gem (https://github.com/nebulab/erb-formatter#readme).

Features

  • very fast
  • attempts to limit length (configurable)
  • tries to have an output similar to prettier for HTML
  • indents correctly ruby blocks (e.g. if/elsif/do/end)
  • designed to be integrated into editors and commit hooks
  • gives meaningful output in case of errors (most of the time)
  • will use multiline values for class and data-action attributes

Requirements

Only requires the erb language to be defined, usually added by https://github.com/rubyide/vscode-ruby.

Extension Settings

This extension contributes the following settings:

  • erb-formatter.commandPath: Customize the full command for the ERB Formatter, includes bundler or any extra option.
  • erb-formatter.lineLength: Customize the line length where the formatter will start breaking lines. Defaults to 80.

Release Notes

VSCode extension: https://github.com/nebulab/erb-formatter-vscode/releases ERB::Formatter https://github.com/nebulab/erb-formatter/releases

Releasing

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