Vim has an option called scrolloff
(e.g. set scrolloff=7
) which automatically scrolls down or up to keep the cursor
/point
from getting within a certain distance of the top or bottom of the window.
Is there a way to emulate this behavior in vanilla Emacs / evil mode? (preferably without advising every function that's capable of moving the point)
Emacs is capable of scrolling line by line (e.g. C-u 1 C-v
and C-u 1 M-v
), but the default behavior seems to be to scroll by full or half screens (maybe to limit the number of times that the entire screen needs to be updated?).