开发者

Emacs: PageUp PageDown and return to the initial position

In Emacs, why I press PageUp and then PageDown, the cursor does not return to the initial position, but some other place on开发者_开发知识库 the page. Is there any way to make it do this? For example, have PageUp and PageDown just move the cursor up or down the number of rows visible.


Set the variable scroll-preserve-screen-position.

A value of t means point keeps its screen position if the scroll command moved it vertically out of the window, e.g. when scrolling by full screens.

Recent versions of Emacs will also preserve the current column even if that column doesn't exist in the intermediate position.


There is a package you can use to do this: scroll-in-place

I found it on the Emacs wiki page for SmoothScrolling.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜