Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Ruby Syntax ReplacerNew to Visual Studio Code? Get it now.
Ruby Syntax Replacer

Ruby Syntax Replacer

Kosai106

|
30,189 installs
| (0) | Free
Replaces old Ruby syntax with new
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Ruby Syntax Replacer for VSCode

Goodbye old hash rocket syntax

Features

Ruby

# Old syntax
data = [
  { 1 => "en", 2 => "to", 3 => "tre" },
  { :one => "un", :two => "deux", :three => "trois" },
  { "weights" => ["pound", "kilogram"], "lengths" => ["meter", "mile"] },
  { :de => { :one => "eins", :two => "zwei", :three => "drei" } }
]

# New syntax
data = [
  { 1: "en", 2: "to", 3: "tre" },
  { one: "un", two: "deux", three: "trois" },
  { "weights": ["pound", "kilogram"], "lengths": ["meter", "mile"] },
  { de: { one: "eins", two: "zwei", three: "drei" } }
]

HAML

-# Old syntax
%div{:data => {:someValue => "Hello world", :"other-value" => 123, :"some-really-long-attr" => true}}

-# New syntax
%div{data: {someValue: "Hello world", "other-value": 123, "some-really-long-attr": true}}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft