Skip to content

Instantly share code, notes, and snippets.

@jeffsaracco
Last active March 19, 2018 13:01
Show Gist options
  • Save jeffsaracco/10919823 to your computer and use it in GitHub Desktop.
Save jeffsaracco/10919823 to your computer and use it in GitHub Desktop.
Vim search and replace to change old ruby hash syntax (ie: :symbol => 'value') into new ruby hash syntax (ie: symbol: 'value')

For old ruby hash syntax with symbols %s/:\([a-z_]\+\) =>/\1:/gc

For old syntax with strings %s/"\([a-z]\+\)" =>/\1:/gc

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