Skip to content

Instantly share code, notes, and snippets.

@hadronzoo
Last active August 29, 2015 13:56
Show Gist options
  • Save hadronzoo/9332816 to your computer and use it in GitHub Desktop.
Save hadronzoo/9332816 to your computer and use it in GitHub Desktop.
Replace hash rockets with Ruby 1.9 symbol keys
;; Replace hash rockets with Ruby 1.9 symbol keys
(defun replace-hash-rockets ()
(interactive)
(goto-char 1)
(while (search-forward-regexp ":\\(\\(\\w\\|_\\)+\\) =>" nil t)
(replace-match (concat (match-string 1) ":") t nil)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment