Sublime Forum

Plugin for Ruby hash

#1

Hello, is there a plugin to convert ruby hash like this:
{"title"=>nil, "part_type"=>"subscription", "caption"=>"Please register", "character"=>{"id"=>1, "url"=>"", "name"=>"abc"}, "backgroundImage"=>{"id"=>"", "alt"=>"", "url"=>""}, "upload_id"=>"123abc"}
into this?

{
“title”=>nil,
“part_type”=>“subscription”,
“caption”=>“Please register”,
“character”=>{
“id”=>1,
“url”=>"",
“name”=>“abc”
},
“backgroundImage”=>{
“id”=>"",
“alt”=>"",
“url”=>""
},
“upload_id”=>“123abc”
}

If yes:
What is the package name to install from Package Control?
How to install it and do I need to add the package info in the Preferences.sublime-settings file?
What is the MacOs shortcut keys on keyboard to format the hash?
Thank you.

0 Likes

#2

Not sure, but maybe you could configure rubocop to format a Hash that way. In that case, you may use it with SublimeLinter or within an LSP Server (via the LSP plugin configured as “diagnostic” iirc).

0 Likes