Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Kosai106/vscode-ruby-syntax-replacer

Repository files navigation

Ruby Syntax Replacer for VSCode

Goodbye old hash rocket syntax

Features

Ruby

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

# New syntax
data = [
  { 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}}