diff --git a/files/init.el b/files/init.el index d1ed245..9b72977 100644 --- a/files/init.el +++ b/files/init.el @@ -92,6 +92,13 @@ ;; Whitespace (global-whitespace-mode t) (setq whitespace-style '(face trailing tabs tab-mark)) +; remove trailing whitespaces on save +(add-hook 'before-save-hook 'whitespace-cleanup) + +;; Fold code +(add-hook 'prog-mode-hook #'hs-minor-mode) +(global-set-key (kbd "C-c ") 'hs-show-block) +(global-set-key (kbd "C-c ") 'hs-hide-block) ;; straight.el bootstrap (setq straight-check-for-modifications 'live) @@ -644,10 +651,6 @@ ("XXX" . hl-todo-TODO) ("FIXME" . hl-todo-TODO)))) -(add-hook 'prog-mode-hook #'hs-minor-mode) -(global-set-key (kbd "C-c ") 'hs-show-block) -(global-set-key (kbd "C-c ") 'hs-hide-block) - ;; load local file (when (file-exists-p "~/.emacs.d/local.el") (message "Loading ~/.emacs.d/local.el")