From bb5718022342b240a457f5a822bb7803415f0d5c Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Wed, 10 Feb 2016 10:07:27 -0500 Subject: [PATCH] played with css/scss a bit to get 2 spaces for indents --- init.el | 14 +++++++++++--- scss-mode.el | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index 9a399c9..ffd1bd2 100644 --- a/init.el +++ b/init.el @@ -6,9 +6,16 @@ ;;(require 'multi-term) ;;(setq multi-term-program "/bin/bash") +;; CSS Mode needs to be applied to scss files. +(add-to-list 'auto-mode-alist '("\\.scss" . css-mode)) +(setq-default css-indent-offset 2) + ;; Always use spaces instead of tabs, a tab is 4 spaces by default +(setq-default tab-always-indent t) (setq-default indent-tabs-mode nil) (setq-default tab-width 4) +(setq-default tab-stop-list (number-sequence 4 120 4)) +(setq-default tab-always-indent 'complete) ;; WhiteSpace hilighting (require 'whitespace) @@ -51,8 +58,9 @@ ;;(pymacs-load "ropemacs" "rope-") ;; SCSS -(require 'scss-mode) -(setq scss-compile-at-save nil) +;;(autoload 'scss-mode "scss-mode") +;;(add-to-list 'auto-mode-alist '("\\.scss\\'" . scss-mode)) +;;(setq-default scss-compile-at-save nil) ;; PHP and Drupal-Modes ;; http://stackoverflow.com/questions/898063/making-php-mode-and-other-cc-mode-derived-modes-compatible-with-emacs-23 @@ -88,7 +96,7 @@ (add-to-list 'flymake-allowed-file-name-masks '("\\.php$" flymake-php-init)) ;; Drupal-type extensions (add-to-list 'flymake-allowed-file-name-masks - '("\\.\\(inc\\|module\\|test\\|install\\|theme\\)$" + '("\\.\\(inc\\|module\\|test\\|install\\|theme\\)$" flymake-php-init)) (add-hook 'php-mode-hook (lambda () (flymake-mode 1))) (add-hook 'php-mode-hook (lambda () diff --git a/scss-mode.el b/scss-mode.el index 8dc76c7..b24b6e9 100644 --- a/scss-mode.el +++ b/scss-mode.el @@ -31,6 +31,8 @@ (require 'derived) (require 'compile) (require 'flymake) +(setq-default tab-width 2) +(setq-default tab-stop-list number-sequence(2 120 2)) (defgroup scss nil "Scss mode"