From 880a32fa1bbabaf73629177a4384779e76a6dc00 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 20 Nov 2016 09:36:13 -0800 Subject: [Emacs] Split the configuration in individual lines. Instead of having a large `(setq ...)', let's have multiple one. This makes it easier to comment on them. --- emacs.d/lib/settings.el | 47 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/emacs.d/lib/settings.el b/emacs.d/lib/settings.el index 5869416..58c2937 100644 --- a/emacs.d/lib/settings.el +++ b/emacs.d/lib/settings.el @@ -1,3 +1,6 @@ +;; I don't want a startup screen +(setq inhibit-startup-screen t) + ;; disable tool bar and the scroll bar (dolist (mode '(tool-bar-mode scroll-bar-mode)) (when (fboundp mode) (funcall mode -1))) @@ -6,10 +9,14 @@ (electric-pair-mode 1) ;; show trailing white space for prog modes +;; FIXME this should probably be moved somewhere else. I need +;; to revisit the various prog-mode-hook. (add-hook 'prog-mode-hook (lambda () (setq show-trailing-whitespace t))) ;; this makes emacs slow to work with source +;; FIXME revisit this variable and see if it should be moved to magit +;; FIXME I'm still not sure how the VC mode is actually useful (delete 'Git vc-handled-backends) ;; alias yes-or-no to y-or-n @@ -23,24 +30,36 @@ ;; reload the buffer when a file changes (global-auto-revert-mode 1) -;; global settings for built-in emacs parameters -(setq auto-save-default nil - auto-save-list-file-prefix nil - inhibit-startup-screen t - initial-scratch-message nil - make-backup-files nil - require-final-newline t - vc-follow-symlinks t - next-screen-context-lines 5 - column-number-mode t - ring-bell-function 'ignore - tab-always-indent 'complete) +;; show column number in the mode line +(setq column-number-mode t) + +;; when saving the file, ensure a newline exists at the end of the file +(setq require-final-newline t) + +;; no initial message in the scratch buffer +(setq initial-scratch-message nil) + +;; follow symlinks +(setq vc-follow-symlinks t) + +;; scroll 5 lines at a time +(setq next-screen-context-lines 5) + +;; when using TAB, always indent +(setq tab-always-indent 'complete) + +;; don't auto save files +(setq auto-save-default nil) + +;; I really don't want backup files +(setq auto-save-list-file-prefix nil + make-backup-files nil) ;; How long to display an echo-area message when the minibuffer is active. (setq minibuffer-message-timeout 0.5) -(setq-default indent-tabs-mode nil - create-lockfiles nil) +;; don't use a lock file +(setq-default create-lockfiles nil) ;; show parenthesis (show-paren-mode +1) -- cgit 1.4.1