(Ctrl + Up / Down) - Stylish Scrolling in Emacs

I do not mean smooth scrolling, but holding the cursor at a fixed point and always moving one β€œscreen” one line at a time, since one (in Eclipse or other IDEs) presses ctrl + up / down.

Then, when one presses the up / down button, the screen jumps as necessary to ensure the visibility of the cursor.

I don't know what it's called.

Was it implemented in Emacs?

+4
source share
4 answers

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

You learn to live with him, though.

Interestingly, you have so much success bending Emacs as you wish. Personally, I think that if I don't at least date Emacs halfway, it gives me pain.

+3
source

As already mentioned, Emacs does not currently offer this feature. It can be implemented, but no one bothered to do it, AFAIK [EDIT: actually, it seems, I remember incorrectly, and Martin really implemented such a thing, see https://lists.gnu.org/archive/html /emacs-devel/2008-02/msg01892.html ]. The usual workaround is to place the label with C-SPC C-SPC and then use Cu C-SPC when you want to return to where you were.

+4
source

One of the great dogmas of Emacs says that the cursor (the β€œdot” in Emacs-talk) should always be visible, therefore, you cannot describe the behavior.

+2
source

I think you're looking for that (from the emacswiki scroll page)

(defun gcm-scroll-down () (interactive) (scroll-up 1)) (defun gcm-scroll-up () (interactive) (scroll-down 1)) (global-set-key [(control down)] 'gcm-scroll-down) (global-set-key [(control up)] 'gcm-scroll-up) 
+1
source

Source: https://habr.com/ru/post/1400365/


All Articles