Created
May 11, 2013 19:16
-
-
Save jewel12/5561050 to your computer and use it in GitHub Desktop.
カーソル手前の単語群をアンダースコアでつなげる
This file contains 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
(defun join-words-by-underscore () | |
(interactive) | |
(save-excursion | |
(save-restriction | |
(looking-back "[\s-\]*\\(\[a-zA-Z0-9\s-\]+\\)" nil t) | |
(narrow-to-region (match-beginning 1) (match-end 1)) | |
(beginning-of-line) | |
(replace-string " " "_")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment