在Emacs中,为什么我按PageUp再按PageDown,光标并没有回到初始位置,而是回到了页面的其他地方。有什么办法让它做到这一点?例如,让 PageUp 和 PageDown 仅将光标向上或向下移动可见的行数。
最佳答案
设置变量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.
最新版本的 Emacs 也会保留当前列,即使该列不存在于中间位置也是如此。
关于Emacs:PageUp PageDown 并回到初始位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7324996/