From 9cfb29695942fec7d90f131c08707b4c958d3435 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 23 Feb 2021 12:50:29 -0600 Subject: Fix scrolling in margins I honestly probably need to tag my shit or something, because this commit was /really/ hard to find. Or hopefully, as I get more steady with my Emacs config it'll be less volatile. --- config.org | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/config.org b/config.org index 1263c8e..16b07e0 100644 --- a/config.org +++ b/config.org @@ -1319,6 +1319,32 @@ of how /terrible/ it is to have them. *** Visual fill column mode +**** First: fix scrolling in margins + +This has to be done /before/ loading the package. It's included in +=visual-fill-column=, too, but for some reason isn't loaded there. + +#+BEGIN_SRC emacs-lisp + (dolist (margin '(right-margin left-margin)) + (dolist (button '(mouse-1 mouse-2 mouse-3)) + (global-set-key (vector margin button) + (global-key-binding (vector button))))) + + (mouse-wheel-mode +1) + + (when (bound-and-true-p mouse-wheel-mode) + (dolist (margin '(right-margin left-margin)) + (dolist (event '(mouse-wheel-down-event + mouse-wheel-up-event + wheel-down + wheel-up + mouse-4 + mouse-5)) + (global-set-key (vector margin event) #'mwheel-scroll)))) +#+END_SRC + +**** Then: =visual-fill-column= :package: + In reading-intensive views, this mode keeps the text from getting too wide. -- cgit 1.4.1-21-gabe81