类似于Emacs的Vim滚动

时间:2014-05-28 21:22:49

标签: vim emacs

对于那些不知道的人,Emacs滚动默认情况下的AFAIK按以下方式工作。

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

在Vim中实现这一目标的方法是什么?有没有办法做到这一点?如果没有,有什么指针可以实现这样的东西?我的想法是,在达到scrolloff时,可能会获得两全其美并滚动半页或一页。

感谢任何帮助。 :)

1 个答案:

答案 0 :(得分:5)

我认为这会做你想要的:

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.
相关问题