In vim, for an entire file:
In the shell, for an entire project:
perl -pi -e 's/:([\w\d_]+)(\s*)=>/\1:/g' **/*.rb
Now, instead of those old-school hashes like this:
get '/', :agent => MOBILE_BROWSERS do
You’ll have new-school hashes like this:
get '/', agent: MOBILE_BROWSERS do
Written by Dan Croak.