aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMountain Man <43313373+MountainMan1312@users.noreply.github.com>2023-04-20 13:52:44 -0400
committerMountain Man <43313373+MountainMan1312@users.noreply.github.com>2023-04-20 13:52:44 -0400
commit82c1d4b5ccc6e87c83ec31c88451026e6a04a7c2 (patch)
tree2b1e9701be00faa34bffd516af61737b8fd5c1d2
parentImprove whitespace functionality in text editor (diff)
downloadmmosmacs-82c1d4b5ccc6e87c83ec31c88451026e6a04a7c2.tar.gz
mmosmacs-82c1d4b5ccc6e87c83ec31c88451026e6a04a7c2.tar.bz2
mmosmacs-82c1d4b5ccc6e87c83ec31c88451026e6a04a7c2.zip
Enhance scrolling behavior
Make scrolling smooth and easy to follow, as opposed to the jumpy default behavior. Add a scroll margin and make point move to the top/bottom of the screen if attempting to scroll past the beginning/end of the buffer.
-rw-r--r--init.el28
1 files changed, 28 insertions, 0 deletions
diff --git a/init.el b/init.el
index faf8233..a578665 100644
--- a/init.el
+++ b/init.el
@@ -90,6 +90,34 @@
90(global-visual-line-mode) 90(global-visual-line-mode)
91 91
92 92
93;; ---------------------------------
94;; Scrolling
95;; ---------
96;; This makes the scrolling behavior
97;; smoother and easier to follow.
98;; ---------------------------------
99
100;; Small scroll margin makes it
101;; easier to see when to stop when
102;; scrolling fast.
103(setq scroll-margin 2)
104
105;; Make mouse scroll smoother
106(setq mouse-wheel-scroll-amount '(2))
107 mouse-wheel-progressive-speed nil
108 mouse-wheel-follow-mouse t)
109
110;; Prevent jumpy scrolling
111(setq scroll-conservatively 10
112 auto-window-vscroll nil
113 scroll-preserve-screen-position t)
114
115;; Move point to beginning/end of
116;; buffer if attempting to scroll
117;; when already at the beginning/end
118;; of buffer
119(setq scroll-error-top-bottom t)
120
93 121
94 122
95;; --------------------------------------------------------------------- 123;; ---------------------------------------------------------------------