about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--config.org61
1 files changed, 22 insertions, 39 deletions
diff --git a/config.org b/config.org index 21120c6..41eec49 100644 --- a/config.org +++ b/config.org
@@ -210,26 +210,6 @@ This is extremely fiddly and I'd love another option.
210 (define-key acdw/map (kbd "M-o") #'crux-other-window-or-switch-buffer) 210 (define-key acdw/map (kbd "M-o") #'crux-other-window-or-switch-buffer)
211#+end_src 211#+end_src
212 212
213*** Visual fill column mode
214
215In reading-intensive views, this mode keeps the text from getting too
216wide.
217
218#+begin_src emacs-lisp :noweb-ref packages
219 (straight-use-package 'visual-fill-column)
220#+end_src
221
222#+begin_src emacs-lisp :noweb-ref settings
223 (setq-default visual-fill-column-center-text t)
224#+end_src
225
226#+begin_src emacs-lisp :noweb-ref hooks
227 (add-hook 'visual-line-mode-hook #'visual-fill-column-mode)
228
229 (with-eval-after-load 'visual-fill-column
230 (advice-add 'text-scale-adjust :after #'visual-fill-column-adjust))
231#+end_src
232
233*** The *Help* window 213*** The *Help* window
234 214
235I want to select the *Help* window by default, so I can easily quit it. 215I want to select the *Help* window by default, so I can easily quit it.
@@ -1270,30 +1250,13 @@ that's the only time I accidentally call it, anyway.
1270 1250
1271*** Auto-fill vs. Visual-line 1251*** Auto-fill vs. Visual-line
1272 1252
1273I've mostly been using visual-line mode, and it's been pretty good. 12531. Enable =auto-fill-mode= with text modes.
1274There are some times, however, when lines are just ... really long,
1275and they wrap weird or whatever. Not to mention, in Org mode,
1276=visual-line-mode= screws up the bindings for line movement. So
1277here's what I'm going to do.
1278
12791. Enable =visual-line-mode= with =text-mode=, but /not/ with
1280 =org-mode=.
1281
1282 #+begin_src emacs-lisp :noweb-ref hooks
1283 (defun hook--visual-line-mode ()
1284 (unless (eq major-mode 'org-mode)
1285 (visual-line-mode +1)))
1286
1287 (add-hook 'text-mode-hook #'hook--visual-line-mode)
1288 #+end_src
1289
12902. Enable =auto-fill-mode= with text modes.
1291 1254
1292 #+begin_src emacs-lisp :noweb-ref hooks 1255 #+begin_src emacs-lisp :noweb-ref hooks
1293 (add-hook 'text-mode-hook #'auto-fill-mode) 1256 (add-hook 'text-mode-hook #'auto-fill-mode)
1294 #+end_src 1257 #+end_src
1295 1258
12963. /Just/ in case ... let's "fix" =visual-line-mode= if we're in =org-mode=. 12592. /Just/ in case ... let's "fix" =visual-line-mode= if we're in =org-mode=.
1297 1260
1298 #+begin_src emacs-lisp :noweb-ref hooks 1261 #+begin_src emacs-lisp :noweb-ref hooks
1299 (defun hook--visual-line-fix-org-keys () 1262 (defun hook--visual-line-fix-org-keys ()
@@ -1310,6 +1273,26 @@ I think that'll work -- I only care about line aesthetics with text.
1310Programming modes should be /allowed/ to have long lines, regardless 1273Programming modes should be /allowed/ to have long lines, regardless
1311of how /terrible/ it is to have them. 1274of how /terrible/ it is to have them.
1312 1275
1276*** Visual fill column mode
1277
1278In reading-intensive views, this mode keeps the text from getting too
1279wide.
1280
1281#+begin_src emacs-lisp :noweb-ref packages
1282 (straight-use-package 'visual-fill-column)
1283#+end_src
1284
1285#+begin_src emacs-lisp :noweb-ref settings
1286 (setq-default visual-fill-column-center-text t)
1287#+end_src
1288
1289#+begin_src emacs-lisp :noweb-ref hooks
1290 (add-hook 'visual-fill-column-mode-hook #'visual-line-mode)
1291
1292 (with-eval-after-load 'visual-fill-column
1293 (advice-add 'text-scale-adjust :after #'visual-fill-column-adjust))
1294#+end_src
1295
1313*** Stay snappy with long-lined files 1296*** Stay snappy with long-lined files
1314 1297
1315#+begin_src emacs-lisp :noweb-ref modes 1298#+begin_src emacs-lisp :noweb-ref modes