From 72d4c9b53aa37f4affa480ec907a1548b5299698 Mon Sep 17 00:00:00 2001 From: finga Date: Tue, 22 May 2018 09:40:19 +0200 Subject: [PATCH] automatically remove trailing whitespaces, add last newline at eof and add magit to installed packages --- .emacs.d/init.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 1bdfa98..2c0d6ec 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -17,12 +17,23 @@ ;; use space instead of tabs (setq-default indent-tabs-mode nil) +;; delete trailing whitespaces before saving +(add-hook 'before-save-hook 'delete-trailing-whitespace) + +;; add newlines at eof +(setq require-final-newline t) +;; (setq mode-require-final-newline t) + ;; theme (custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. '(column-number-mode t) '(custom-enabled-themes (quote (tango-dark))) '(menu-bar-mode nil) - '(package-selected-packages (quote (pass pinentry))) + '(package-selected-packages (quote (magit pass pinentry))) '(scroll-bar-mode nil) '(show-paren-mode t) '(tool-bar-mode nil))