vim - Vim 中类似 Emacs 的滚动

标签 vim emacs

对于那些不知道的人,默认情况下 AFAIK 在 Emacs 中的滚动方式如下。

它不会滚动,直到用户到达可见缓冲区的末尾,当您到达可见缓冲区的末尾并且在可见缓冲区上移动时,它不会加载一行,而是加载整个新页面,基本上。我想这是为了减少重新渲染屏幕时的延迟。

在 Vim 中有什么方法可以做到这一点?有没有办法做到这一点?如果没有,有什么指示可以实现这样的事情?我的想法可能是两全其美,当达到 scrolloff 时滚动半页或一页。

感谢任何帮助。 :)

最佳答案

我想这会做你想做的:

set sj=-50

查看 :h 'sj' 获取详细信息:

'scrolljump' 'sj'   number  (default 1)
            global
            {not in Vi}
    Minimal number of lines to scroll when the cursor gets off the
    screen (e.g., with "j").  Not used for scroll commands (e.g., CTRL-E,
    CTRL-D).  Useful if your terminal scrolls very slowly.
    When set to a negative number from -1 to -100 this is used as the
    percentage of the window height.  Thus -50 scrolls half the window
    height.
    NOTE: This option is set to 1 when 'compatible' is set.

关于vim - Vim 中类似 Emacs 的滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23922099/

相关文章:

emacs - 如何在 emacs 中的一次调用中在新框架中打开间接缓冲区?

linux - 在 vim 编辑器中输入 ^Q

vim - 我可以创建一个新文件,并在单个命令的新选项卡中打开它吗?

regex - 从 Linux 中的多个文件中删除一大串文本/代码

emacs - 编译缓冲区以显示在垂直缓冲区中

emacs - make-network-process在windows下工作吗?

emacs - 增加 Emacs 的所见即所得性

linux - 神秘的 Emacs 问题

vim - 复制 VI 中的部分行

vim - Gvim : Move tab to new window