Enable Visual Fill Column in Org Mode buffers

Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
magic_rb 2023-11-03 20:10:14 +01:00
parent 352c876fbc
commit 729e68b80e
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E

View file

@ -1,5 +1,6 @@
:PROPERTIES: :PROPERTIES:
:ID: 986ca7a5-d225-49bb-9e35-f2dffafe8aee :ID: 986ca7a5-d225-49bb-9e35-f2dffafe8aee
:header-args:emacs-lisp: :comments link :results none
:END: :END:
#+title: Org Mode #+title: Org Mode
#+filetags: emacs-load #+filetags: emacs-load
@ -139,9 +140,6 @@ Don't delete other windows when exporting, it is very distracting, just use popp
(advice-add 'org-export--dispatch-ui :around 'org-export--dispatch-ui/popper) (advice-add 'org-export--dispatch-ui :around 'org-export--dispatch-ui/popper)
#+end_src #+end_src
#+RESULTS:
** Sliced Previews ** Sliced Previews
Normally a LaTeX preview is just one huge image which makes Emacs really jumpy and makes writing prose a really unpleasant experience. With these two functions, that's fixed. They work using mainly text properties (overlays are still involved but only one per preview, max two) so it should be fast still. Normally a LaTeX preview is just one huge image which makes Emacs really jumpy and makes writing prose a really unpleasant experience. With these two functions, that's fixed. They work using mainly text properties (overlays are still involved but only one per preview, max two) so it should be fast still.
@ -227,3 +225,18 @@ Normally a LaTeX preview is just one huge image which makes Emacs really jumpy a
#+end_src #+end_src
* Visual Fill Column
I figured out eventually that having columns filled at a consistent width and having the text centered is really nice for prose. So enable it.
#+begin_src emacs-lisp
(defun magic_rb/org-mode-visual-fill-column-mode-conf ()
""
(setq visual-fill-column-center-text t))
#+end_src
#+begin_src emacs-lisp
(add-hook 'org-mode-hook #'visual-fill-column-mode)
(add-hook 'org-mode-hook #'magic_rb/org-mode-visual-fill-column-mode-conf)
#+end_src