Suggestion for improvement: Add key bindings for "scroll in place"

20 views
Skip to first unread message

Johan Widén

unread,
Jan 6, 2014, 2:19:32 PM1/6/14
to emacs-...@googlegroups.com
I have found it convenient to be able to scroll a window "in place":
- The window scrolls one line at a time, and the cursor keeps its
buffer position.

I have added the following to my personal prelude config:

;; Scroll in place
(global-set-key [(hyper up)]
(lambda ()
(interactive)
(let ((scroll-preserve-screen-position nil))
(scroll-down 1))) )

(global-set-key [(hyper down)]
(lambda ()
(interactive)
(let ((scroll-preserve-screen-position nil))
(scroll-up 1))) )

Perhaps something like this could be added to prelude?

--
Johan Widén
Reply all
Reply to author
Forward
0 new messages