aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshton Wiersdorf <mail@wiersdorf.dev>2023-03-31 15:53:24 -0600
committerAshton Wiersdorf <mail@wiersdorf.dev>2023-03-31 15:53:24 -0600
commit879d948fc9a3a3466f6ad86fee478af343ac15f7 (patch)
tree49bd25b36875b281c2c630b1a27c3b121d8b6f03
parent4381c92be03094f9711337b17d06077c0dc23ed5 (diff)
Add hook to turn on visual-line-mode for sane line-breaking
-rw-r--r--init.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/init.el b/init.el
index 0684f4c..1106538 100644
--- a/init.el
+++ b/init.el
@@ -48,7 +48,7 @@
(when (display-graphic-p)
(context-menu-mode))
-;; Don't litter filesystem with *~ backup files; put them all inside
+;; Don't litter file system with *~ backup files; put them all inside
;; ~/.emacs.d/backup or wherever
(defun bedrock--backup-file-name (fpath)
"Return a new file path of a given file path.
@@ -140,6 +140,9 @@ If the new path's directories does not exist, create them."
;; Display line numbers in programming mode
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
+;; Nice line wrapping when working with text
+(add-hook 'text-mode-hook 'visual-line-mode)
+
;; Modes to highlight the current line with
(let ((hl-line-hooks '(text-mode-hook prog-mode-hook)))
(mapc (lambda (hook) (add-hook hook 'hl-line-mode)) hl-line-hooks))