Last Updated: February 25, 2016
·
702
· bostonaholic

Replace :key => with key: in emacs

If you're in emacs and you would like to easily swap your ruby 1.8 hash syntax to the newer 1.9 syntax, here's a simple way to accomplish this.

M-x replace-regexp

:\([a-zA-Z0-9_]+\)\ =>

\1: