diff options
author | Timo Wilken | 2023-03-04 19:20:56 +0100 |
---|---|---|
committer | Timo Wilken | 2023-03-04 19:20:56 +0100 |
commit | bb5e2eef395b094925ceca5c5a6d83270cba213d (patch) | |
tree | 5db05cf66573ba3563285d50dc7b071e9461c651 /tw/home/files | |
parent | 654406930accb455a1a177c7fc9c4ba7d9947cf7 (diff) |
Word-wrap Markdown files
Diffstat (limited to 'tw/home/files')
-rw-r--r-- | tw/home/files/emacs-init.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tw/home/files/emacs-init.el b/tw/home/files/emacs-init.el index 1fce11ba..8cf6c20c 100644 --- a/tw/home/files/emacs-init.el +++ b/tw/home/files/emacs-init.el @@ -63,6 +63,7 @@ (mapc (apply-partially #'add-to-list 'auto-mode-alist) `((,(rx (or bos "/") "PKGBUILD" eos) . sh-mode) (,(rx ".install" eos) . sh-mode) + (,(rx (or bos "/") "COMMIT_EDITMSG" eos) . text-mode) (,(rx bos "/tmp/neomutt-") . mail-mode) (,(rx ".eml" eos) . mail-mode) (,(rx "." (1+ anything) "rc" eos) . conf-unix-mode))) @@ -75,6 +76,11 @@ (add-hook 'mail-mode-hook #'auto-fill-mode) +(defun tw/enable-word-wrap () + "Enable word wrapping." + (toggle-word-wrap +1)) +(add-hook 'markdown-mode-hook #'tw/enable-word-wrap) + ;; `use-package' requirements. (require 'package) (package-initialize t) |