Transforming Ruby's hashrocket (to the new syntax)
When working in projects which started before Ruby 1.9, I don't like the mix of the old hashrocket style hashes and the new one.
So when you want to transform the hashrocket syntax to the new one in your project, this simple regex will save you some time. Just use the following string in your "Find" or "Find in Project" prompt in Textmate.
If Vim is your editor of choice, just change
This will transform all hashes from the old format to the new where possible.
The regex uses only lowercase letters so that it doesn't find namespaced classes as the key. Plus uppercase letters in symbols are pretty rare (but allowed).