Created
February 12, 2013 03:38
-
-
Save trevorrjohn/4760069 to your computer and use it in GitHub Desktop.
Vim regex to change old style rails hashes to new style (ie. :key => "value" to key: "value")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:%s/:\(\w*\) =>/\1:/g |
On a directory!
perl -pi -e 's/:(\w*) =>/\1:/g' `find app -type f`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For copy-pasting: