From 01907ed38ea5cedcefff6a1d49c4fd7e42a13dc5 Mon Sep 17 00:00:00 2001 From: Nathan Schneider Date: Thu, 26 Dec 2024 22:37:28 -0700 Subject: [PATCH] Corrected erroneous losses to .emacs --- .emacs | 51 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/.emacs b/.emacs index 56b62c1..cf29e33 100644 --- a/.emacs +++ b/.emacs @@ -1,4 +1,4 @@ -;; GETTING STARTED +;; Emacs init file, by and for ntnsndr ;; INITIALIZE MELPA ;; Keep this on top @@ -35,14 +35,14 @@ (global-visual-line-mode t) ;; load word-count tools, use "wc" command to get instant count (load "wc-mode") -;; source: http://is.gd/ag5KOC -(setq backup-directory-alist '(("." . "~/.emacs.d/backup")) - backup-by-copying t ; Don't delink hardlinks - version-control t ; Use version numbers on backups - delete-old-versions t ; Automatically delete excess backups - kept-new-versions 20 ; how many of the newest versions to keep - kept-old-versions 5 ; and how many of the old - ) +;; 4-space tabs as default +(setq-default indent-tabs-mode nil) +(setq-default tab-width 4) + +;; MARKDOWN MODE +(autoload 'markdown-mode "markdown-mode" "Major mode for editing Markdown files" t) +(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode)) +(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) ;; HORIZONTAL WINDOWS ;; open horizontal windows as default for multiple files @@ -54,8 +54,37 @@ (add-hook 'emacs-startup-hook '2-windows-vertical-to-horizontal) ;; MARGINS -(setq-default left-margin-width 1) -(setq-default right-margin-width 1) +(setq-default left-margin-width 2) +(setq-default right-margin-width 2) +;; set window margins +;; (a bit buggy on multiple-window startup, but resolves) +;;(add-hook 'window-configuration-change-hook +;; (lambda () +;; (set-window-margins (car +;; (get-buffer-window-list +;; (current-buffer) nil t)) 2 2))) + + +;; SPELLING + +(add-hook 'text-mode-hook 'flyspell-mode) +(add-hook 'prog-mode-hook 'flyspell-prog-mode) +;; Turn on Flyspell +(dolist (hook '(text-mode-hook)) + (add-hook hook (lambda () + (flyspell-mode 1) + (set-variable 'flyspell-issue-message-flag nil) + (flyspell-buffer)))) + +;; BACKUP CONTROL +;; source: http://is.gd/ag5KOC +(setq backup-directory-alist '(("." . "~/.emacs.d/backup")) + backup-by-copying t ; Don't delink hardlinks + version-control t ; Use version numbers on backups + delete-old-versions t ; Automatically delete excess backups + kept-new-versions 20 ; how many of the newest versions to keep + kept-old-versions 5 ; and how many of the old + ) ;; FUNCTIONS