Title is basically the question. If I hold down C-n
, C-p
, etc., for a second or two, the speed at which it scrolls is too slow for my liking. Is there a way to make it scroll faster if I hold one of the combinations?
Asked
Active
Viewed 1,575 times
4

user4601931
- 161
- 6
2 Answers
2
The following doesn't answer your question, but might be useful (and the effect looks interesting to me), it defines a command to run the last command repeatedly per 0.1 second
(defun repeat-constantly ()
"Repeat last command constantly."
(interactive)
(while (not (input-pending-p))
(repeat nil)
(sit-for 0.1)))
Then C-n M-x repeat-constantly
looks faster than holding down C-n
.

xuchunyang
- 14,527
- 1
- 19
- 39
2
Turns out that this isn't really an emacs question, though perhaps there still is a way to do this in emacs. I'm using a Mac, and I went to System Preferences > Keyboard and increased "Key Repeat" to the fastest setting, and "Delay Until Repeat" to the shortest setting. This was kind of what I wanted ("kind of" because this obviously changes the behavior outside of emacs, too).

user4601931
- 161
- 6
-
Thanks for the tip. I use Mac as well but didn't know such setting. – xuchunyang Dec 11 '18 at 11:57
-
For linux KDE users, System Settings -> Keyborad -> Hardware -> Rate – Fang Zhen Dec 14 '22 at 04:36
fast-but-imprecise-scrolling
was introduced in Emacs, but if you have it, then try setting that tot
. And, then start eliminating things that might be causing the slow-down. TypeC-h m
and see all the minor modes that are active -- try disabling one at a time and see if there is a speed increase. You can also try running the profiler withM-x profiler-start
,M-x-profiler-report
,M-x profiler-stop
. – lawlist Dec 10 '18 at 06:40visual-line-mode
might help. – Drew Dec 10 '18 at 14:37C-n
is stillC-n C-n C-n ...
. The same goes for Down/Up/etc in other applications like web browser. You should use mouse wheel or scroll bar instead, graphical Emacs supports them as well. Besides, you can scroll by larger block such as paragraph and page. – xuchunyang Dec 10 '18 at 17:37C-n
perform the repeatedC-n C-n C-n ...
in a faster fashion. I would rather not use a mouse. – user4601931 Dec 10 '18 at 17:44C-n/C-p
simply can't be as fast as mouse, since mouse can scroll multiple lines once. – xuchunyang Dec 10 '18 at 17:54