I'd like to trigger a scroll in emacs when my cursor gets within 4 lines from the top or bottom of the terminal.

My .vimrc file contains this line:

:set scrolloff=4

What do I add to .emacs to acheive the same?

PS. I promise not to add it with:

vi ~/.emacs
link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

I think scroll-margin will help -- look for it in the Emacs docs on Textual Scrolling.

Put this in your .emacs:

(setq scroll-margin 4)
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.