Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>rufo (Ruby formatter)New to Visual Studio Code? Get it now.

rufo (Ruby formatter)

Matt Bessey

|
62,783 installs
| (4) | Free
Ruby formatter
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-rufo

VS Code extension for formatting ruby files using the rufo gem.

Example of format on save

Features

Supports formatting on save, or with a command

Requirements

Depends on the rufo gem being installed and available in your PATH.

  $ gem install rufo

Usage

Uses the standard VS Code Formatting Extension API.

If you want to format a file one off, you will find > Format Document in your command palette.

Out of the box, Rufo will format your Ruby, ERB, and Gemfile documents on Save. To change this you may override editor.formatOnSave either, or more specifically just for the Ruby language:

  "[ruby]": { // or [erb] / [gemfile]
    "editor.formatOnSave": true
  }

Issues

Doesn't seem to respect .rufo preferences, not sure why yet.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft