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

Rufo - Ruby formatter (Fork)

Preview

baer1

|
620 installs
| (2) | Free
VSCode plugin for the rufo ruby formatter
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-rufo

This extension is a fork of jnbt/vscode-rufo

This Visual Studio Code extension provides formatting via Rufo. It will be used with files that have the “Ruby” syntax. Supports setups via RVM or rbenv.

This project is still in beta

If you would like to report a bug, request a feature or help development, you can view the source code on GitHub.

Installation

You can download this extension from its marketplace page.

Alternatively, press Ctrl+P, type ext install baer1.vscode-rufo-fork and press enter.

rufo installation

Before using this plugin, you must ensure that rufo, version 0.10.0 or higher, is installed on your system. To install rufo, do the following:

  1. Install Ruby.

  2. Install Rufo by typing the following in a terminal:

    gem install rufo
    

If you're are using RVM or rbenv, seek for more information below.

If you are using Windows, please use the settings below.

Settings

You can configure vscode-rufo in your workspace or user settings. You can either

a) Open VS Code settings menu, select "Extensions" and scroll down to "Rufo"

b) Manually adjust your settings via your settings.json file:

{
  ...
  "rufo.exe": "rufo",  // can be an absolute path
  "rufo.args": [],
  "rufo.useBundler": false,
}

Attention: Restart Visual Studio Code after you have made changes to the settings.

On Windows:

  • "rufo.exe": "cmd"
  • "rufo.args": ["/c", "rufo.bat"]

Using RVM

If your setup instruments RVM to install Ruby version you might receive errors indicating Rufo can't be found. Because rufo might not be in your current PATH, you need to change the executable to the RVM-wrapped one:

"rufo.exe": ".../.rvm/gems/ruby-2.3.6/wrappers/rufo"

Using rbenv

If your setup instruments rbenv, you should point the executable to the Rufo shim generated by rbenv. This way the extension will continue to work after you upgrade your Ruby:

"rufo.exe": ".../.rbenv/shims/rufo"

Develop

  • Use Visual Studio Code to develop this extension
  • Run npm install to install the dependencies
  • Press F5 to open a new window with the extension loaded
  • Open a Ruby file or paste some Ruby code into the window
  • Open the command palette by pressing (Ctrl+Shift+P or Cmd+Shift+P on Mac)
  • Choose either "Format Document" for "Format Selection".
  • Find output from the extension in the debug console.

Testing

  • Open the debug viewlet (Ctrl+Shift+D or Cmd+Shift+D on Mac) and from the launch configuration dropdown pick Launch Tests
  • Press F5 to run the tests in a new window with your extension loaded
  • See the output of the test result in the debug console

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft