Revisions
-
mori revised this gist
Nov 15, 2010 . 2 changed files with 11 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,14 @@ ;; 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") File renamed without changes. -
WaYdotNET created this gist
Nov 15, 2010 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ ;; (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 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ # 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