From f5cc1353dfb7b74a6f75981f1d77b1c3c7fd10d8 Mon Sep 17 00:00:00 2001 From: Kevin Cotugno Date: Tue, 23 May 2017 10:36:30 -0700 Subject: [PATCH] Better text formatting defaults --- config/emacs.d/init.el | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/config/emacs.d/init.el b/config/emacs.d/init.el index 86d0bfc..6e8cb94 100644 --- a/config/emacs.d/init.el +++ b/config/emacs.d/init.el @@ -54,11 +54,25 @@ ;; End auto generated config ;; Text Formatting -(setq-default indent-tabs-mode nil) -(setq-default tab-width 2) +(setq-default standard-indent 8) (setq-default c-default-style "linux" c-basic-offset 8 tab-width 8) + +(add-hook 'emacs-lisp-mode-hook (setq indent-tabs-mode nil)) +(add-hook 'ruby-mode-hook (lambda () + (setq evil-shift-width 2) + (setq indent-tabs-mode nil) + (setq tab-width 2))) +(add-hook 'js-mode-hook (lambda () + (setq evil-shift-width 2) + (setq indent-tabs-mode nil) + (setq js-indent-level 2))) +(add-hook 'css-mode-hook (lambda () + (setq evil-shift-width 2) + (setq indent-tabs-mode nil) + (setq tab-width 2) + (setq css-indent-offset 2))) ;; End text Formatting ;; Backup Files