From d9b12dc272d950d9be444ca20f2d2baaed38b240 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 3 Sep 2015 15:57:48 +0200 Subject: [PATCH] Define some CSS alignment rules --- emacs/.emacs.d/init.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 52fc40d..49e5579 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -925,6 +925,27 @@ from myaethon2.core.decorators import ( (auto-init appt) (auto-init avandu) +(stante-after align + ;; Keep these in order. They are each added to the _front_ of the + ;; list and are applied in order. Changing their order will change + ;; the results. + (add-to-list 'align-rules-list + '(css-closing-brace + (regexp . "\\([ \t]*\\)}$") + (group . (1)) + (modes . '(scss-mode css-mode)))) + (add-to-list 'align-rules-list + '(css-colons + (regexp . "[:;]\\([ \t]*\\)") + (group . (1)) + (modes . '(scss-mode css-mode)) + (repeat . t))) + (add-to-list 'align-rules-list + '(css-opening-brace + (regexp . "^[ \t]*[#.a-zA-Z0-9, &-]*[a-zA-Z0-9]\\([ \t]*\\){.*") + (group . (1)) + (modes . '(scss-mode css-mode))))) + (stante-after auto-complete (add-to-list 'ac-modes 'slime-repl-mode))