Last active
August 29, 2015 13:56
-
-
Save hadronzoo/9332816 to your computer and use it in GitHub Desktop.
Replace hash rockets with Ruby 1.9 symbol keys
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
;; 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