Skip to content

Instantly share code, notes, and snippets.

@apeckham
Created January 7, 2014 02:40
Show Gist options
  • 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

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