Skip to content

Instantly share code, notes, and snippets.

@bsnape
Last active August 29, 2023 05:15
Show Gist options
  • Save bsnape/edff869d5b7dc0b0d7c2 to your computer and use it in GitHub Desktop.
Save bsnape/edff869d5b7dc0b0d7c2 to your computer and use it in GitHub Desktop.
Rubymine find & replace string hash rockets with new syntax
find:
\'(\w+)\'\s*=>
replace:
$1:
replace symbol hash rockets with new syntax
find:
:(\w+)\s*=>
replace:
$1:
@ecbrodie
Copy link

ecbrodie commented Aug 7, 2020

For double-quote users, use this for the find of string hash keys:

\"(\w+)\"\s*=>

@siwoo-park-ringle
Copy link

siwoo-park-ringle commented Aug 29, 2023

From symbol keys to double quote rocket keys

find:
(\w+):

replace:
"$1" =>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment