Created
September 3, 2011 21:07
-
-
Save supaspoida/1191799 to your computer and use it in GitHub Desktop.
Convert hashes to 1.9.2 style with vim
This file contains hidden or 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
# Run :NotRocket to convert current buffer. | |
# Thanks to @tpope for the vim regex fu | |
command! -bar -range=% NotRocket :<line1>,<line2>s/:\(\w\+\)\s*=>/\1:/ge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This command converts
ActiveRecord::RecordNotFound => e
toActiveRecord:RecordNotFound: e
It would be cool if you could fix that. I am more a rubular user than a regex expert... ;)