Skip to content

Instantly share code, notes, and snippets.

@apeckham
Created January 7, 2014 02:40
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apeckham/8293865 to your computer and use it in GitHub Desktop.
Save apeckham/8293865 to your computer and use it in GitHub Desktop.
ruby 1.9 hash syntax in rubymine
http://robots.thoughtbot.com/convert-ruby-1-8-to-1-9-hash-syntax
search = :([^ ]*)(\s*)=>
replace = $1:
@hrishikesh
Copy link

👍 ... working flawlessly .. thanks!!

@hrishikesh
Copy link

Just 1 improvement

:([^,{]*)(\s*)=> for the hash without spaces
:first_name=>"test",:last_name=>"test",:city=>"test",:state=>test,:address1=>"test"

@vnovitskyi
Copy link

thx!

@lowang
Copy link

lowang commented Apr 23, 2017

Rubymine has that build in, just press Alt (Option) + Enter

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