-
-
Save mori-dev/700450 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
;; my answer | |
(defun align-to-comma (begin end) | |
"Align region to comma signs" | |
(interactive "r") | |
(align-regexp begin end | |
",\\(\\s-*\\)[^# \t\n]" 1 1)) | |
;;;; | |
(defun align-to-comma (begin end) | |
"Align region to comma signs" | |
(interactive "r") | |
(align-regexp begin end | |
(rx (group (zero-or-more (syntax whitespace))) ",") 1 1 )) | |
;; or comma not refactor | |
(defun align-to-comma2 (begin end) | |
"Align region to equal signs" | |
(interactive "r") | |
(align-regexp begin end "\\(\\s-+\\)," 1 1 )) |
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
# FROM: | |
class Demo | |
property :id, Ciao | |
property :demo, String | |
property :foo, Bar | |
end | |
# with my align.el | |
class Demo | |
property :id , Ciao | |
property :demo , String | |
property :foo , Bar | |
end | |
# my target is: | |
class Demo | |
property :id, Ciao | |
property :demo, String | |
property :foo, Bar | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment