Search code examples
emacselispcentering

emacs - scroll past top of buffer?


Emacs (and all other text editors) by default show blank space below the bottom lines of a buffer. I want emacs to be able to also scroll above/show blank space like this above the top lines in a buffer as well so that the top lines can be viewed in the center of the screen for small files.


Solution

  • With guidance from Thomas's answer here I have created a minor mode for this which is now available on MELPA:

    TopSpace - Recenter line 1 with scrollable upper margin/padding

    topspace