Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(Ctrl + up/down)-style scrolling in Emacs

Tags:

emacs

scroll

I don't mean smooth scrolling, but keeping the cursor at a fixed point, and always moving one 'screenful', one line at a time, as one (in Eclipse or other IDEs) presses ctrl + up/down.

Then when one presses plain up/down, screen jumps if necessary in order to assure cursor's visibility.

Don't know how is it called.

Has it been implemented in Emacs?

like image 540
deprecated Avatar asked Mar 08 '12 11:03

deprecated


2 Answers

As mentioned, Emacs does not offer this functionality nowadays. It could be implemented, but nobody bothered to do so yet, AFAIK [EDIT: actually, it looks like I mis-rememebered, and Martin did implement such a thing, see https://lists.gnu.org/archive/html/emacs-devel/2008-02/msg01892.html ]. The usual workaround is to place a mark with C-SPC C-SPC and then use C-u C-SPC when you want to return where you were.

like image 131
Stefan Avatar answered Nov 15 '22 08:11

Stefan


Separation of cursor (point) and viewport (window) is common in modern GUI. Unfortunately the Emacs display engine does not allow this. It's not dogmatic, just technical. If you want to write this feature, I'm sure the development team will welcome it.

You do learn to live with it though.

It's interesting that you have so much success bending Emacs to your will. Personally, I find if I don't at least meet Emacs half-way, it gives me pain.

like image 28
event_jr Avatar answered Nov 15 '22 10:11

event_jr