diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/init.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 2105459..baca500 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -35,7 +35,6 @@ ;; --- GLOBAL MODES --- (evil-mode 1) ;; Make emacs usable (global-hl-line-mode 1) ;; Highlight the line containing the cursor -(global-whitespace-mode 1) ;; Display whitespace, highlight trailing whitespace (show-paren-mode 1) ;; Highlight matching parenthesis (use-package ivy @@ -138,6 +137,12 @@ (require 'telephone-line) (telephone-line-mode 1) +;; --- WHITESPACE --- +;; Show whitespace for prog-mode, but not other modes +(define-global-minor-mode bab/global-whitespace-mode whitespace-mode + (lambda () (when (derived-mode-p 'prog-mode) (whitespace-mode)))) +(bab/global-whitespace-mode 1) + ;; --- INDENTATION --- ;; Two callable functions for enabling/disabling tabs in Emacs (defun disable-tabs () (setq indent-tabs-mode nil)) |