Usually, there's some extra "virtual" space shown at the bottom of a buffer, which makes the visual appearance of a file longer than it actually is. This is quite convenient, e.g., if you're trying to recenter (C-l) the last line: you will end up with it being actually in the middle of the window.

Is there an equivalent possibility for the beginning of a buffer? Such that when I recenter the first line, it will show up in the middle of the window, and if I scroll to the top, I'll be able to "virtually" scroll above the first line?

A bit of context: I understand why such behaviour is unintuitive in most cases: scrolling to the top like this will give you a mostly empty window. But in my setup the non-existence of this is sometimes inconvenient: I have an overlay terminal showing up on the top of the screen, which can block code in the top half of a buffer.

An optimal solution would allow for two scrolling modes: one like the default, and one with negative scrolling, such that I can choose and bind what I like (which would be none for normal scrolling, but negative scrolling for C-l and something like M-<mousewheel>.

  • This particular feature does not exist. And, it would have to be implemented in C as part of redisplay for it to work.
    – lawlist
    Dec 30 '18 at 16:23
  • If that is the last word, then it would suffice as an answer! Jan 2 '19 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.