From 634352cb6a3bbced02a6188f23b5b1da5e92b426 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Thu, 20 Apr 2023 12:48:45 -0400 Subject: Improve whitespace functionality in text editor Show trailing whitespace. End sentences with one space. End files with one newline. Use spaces for indentation. Wrap words at buffer edge. --- init.el | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/init.el b/init.el index 79eb285..faf8233 100644 --- a/init.el +++ b/init.el @@ -58,6 +58,40 @@ +;; --------------------------------------------------------------------- +;;; Text Editor +;; ------------ +;; These tweaks are meant to make the text editor more convenient. +;; --------------------------------------------------------------------- + +;; --------------------------------- +;; Whitespace +;; ---------- +;; Spaces, tabs, indentation, +;; newlines, and text-wrapping. +;; --------------------------------- + +;; Show stray whitespace +(setq-default show-trailing-whitespace t + indicate-empty-lines t + indicate-buffer-boundaries 'left) + +;; Make files end with newline +(setq-default require-final-newline t) + +;; Sentences end with ONE space +(setq-default sentence-end-double-space nil) + +;; Use spaces for indentation +(setq-default indent-tabs-mode nil + tab-width 2) + +;; Wrap words at buffer edge +(global-visual-line-mode) + + + + ;; --------------------------------------------------------------------- ;;; File Management ;; ---------------- -- cgit v1.2.3