From 041e4691abab199477a49e40e1515838b06f9d52 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 20 Nov 2016 18:59:04 -0800 Subject: [Emacs] proper configuration for white spaces. Enable it via a hook for all programming modes. --- emacs.d/init.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'emacs.d') diff --git a/emacs.d/init.el b/emacs.d/init.el index df7aa4c..516f259 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -370,9 +370,7 @@ :config (add-hook 'makefile-mode-hook #'(lambda () - (setq whitespace-style '(face trailing tabs) - tab-width 2) - (whitespace-mode)))) + (setq-local tab-width 2)))) (use-package markdown-mode ;; mode to support files in the Markdown format @@ -574,6 +572,12 @@ (setq tramp-default-method "ssh" tramp-persistency-file-name (expand-file-name "var/tramp" user-emacs-directory))) +(use-package whitespace + ;; highlight white spaces + :config + (setq whitespace-style '(face trailing tabs)) + (add-hook 'prog-mode-hook 'whitespace-mode)) + (use-package yaml-mode ;; mode to work wity YAML files :ensure t -- cgit 1.4.1