2021-02-21 02:59:11 +00:00
|
|
|
;; -*- lexical-binding: t; -*-
|
|
|
|
|
2021-02-20 11:40:03 +00:00
|
|
|
;; Fix Emacs' bad defaults
|
|
|
|
|
|
|
|
;; Save backups and autosaves in a centralized place
|
|
|
|
(defvar autosave-directory (expand-file-name "autosaves" user-emacs-directory))
|
|
|
|
(defvar backup-directory (expand-file-name "backups" user-emacs-directory))
|
|
|
|
(make-directory autosave-directory t)
|
|
|
|
(setq auto-save-file-name-transforms `((".*" ,autosave-directory t))
|
|
|
|
backup-directory-alist `(("." . ,backup-directory)))
|
|
|
|
|
|
|
|
;; Sensible variable defaults
|
|
|
|
(setq ring-bell-function nil
|
|
|
|
enable-recursive-minibuffers t
|
|
|
|
read-process-output-max (* 1024 1024)
|
|
|
|
vc-follow-symlinks t
|
2021-02-20 15:45:02 +00:00
|
|
|
display-line-numbers-type 'visual
|
|
|
|
display-buffer-alist '((".*"
|
|
|
|
(display-buffer-reuse-window display-buffer-same-window)
|
|
|
|
(reusable-frames . t)))
|
|
|
|
even-window-sizes nil)
|
2021-02-20 11:40:03 +00:00
|
|
|
(setq-default indent-tabs-mode nil)
|
|
|
|
|
2021-02-21 14:24:02 +00:00
|
|
|
;; Always display line numbers in text/programming modes
|
|
|
|
(add-hook 'prog-mode-hook #'display-line-numbers-mode)
|
|
|
|
(add-hook 'text-mode-hook #'display-line-numbers-mode)
|
2021-02-20 11:40:03 +00:00
|
|
|
|
|
|
|
(provide 'init-defaults)
|