Skip to content

Instantly share code, notes, and snippets.

@supaspoida
Created September 3, 2011 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save supaspoida/1191799 to your computer and use it in GitHub Desktop.
Save supaspoida/1191799 to your computer and use it in GitHub Desktop.
Convert hashes to 1.9.2 style with vim
# 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
@ChristianPeters
Copy link

This command converts ActiveRecord::RecordNotFound => e to ActiveRecord:RecordNotFound: e

It would be cool if you could fix that. I am more a rubular user than a regex expert... ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment