Answers:
z<CR>
或zt
将当前行放在屏幕顶部(<CR>
== Enter)
z.
或zz
将当前行置于屏幕中心
z-
或zb
将当前行置于屏幕底部
(z<CR>
,z.
,和z-
把光标在第一非空白列。zt
,zz
和zb
叶中的光标当前列)
有关在http://vimdoc.sourceforge.net/htmldoc/scroll.html
或
vim类型中滚动的更多信息:help scroll-cursor
z.
了。我想我更喜欢用两个不同的键来敲击而不是双击。您可以同时进行并行击键,只要它们以正确的顺序降落,并且击中之间的时间会很短,因此这是一个非常快速的选择。在z
和.
键是彼此的镜子(至少我的EN-GB键盘上)。您可以合理地选择双击z
,这很不错,我们同时提供了两种选择。
:help scroll-cursor
@mtk的输出提及。请注意,zz
和之间有区别z.
。
以下命令重新定位编辑窗口(您看到的缓冲区的一部分)的位置,同时将光标保持在同一行上:
z<CR> Redraw, line [count] at top of window (default
cursor line). Put cursor at first non-blank in the
line.
zt Like "z<CR>", but leave the cursor in the same
column. {not in Vi}
z{height}<CR> Redraw, make window {height} lines tall. This is
useful to make the number of lines small when screen
updating is very slow. Cannot make the height more
than the physical screen height.
z. Redraw, line [count] at center of window (default
cursor line). Put cursor at first non-blank in the
line.
zz Like "z.", but leave the cursor in the same column.
Careful: If caps-lock is on, this command becomes
"ZZ": write buffer and exit! {not in Vi}
z- Redraw, line [count] at bottom of window (default
cursor line). Put cursor at first non-blank in the
line.
zb Like "z-", but leave the cursor in the same column.
{not in Vi}
对于以下四个命令,光标跟随屏幕。如果将光标所在的字符移出屏幕,则光标将移至屏幕上最近的字符。未使用“ sidescroll”的值。
z<Right> or
zl Move the view on the text [count] characters to the
right, thus scroll the text [count] characters to the
left. This only works when 'wrap' is off. {not in
Vi}
z<Left> or
zh Move the view on the text [count] characters to the
left, thus scroll the text [count] characters to the
right. This only works when 'wrap' is off. {not in
Vi}
zL Move the view on the text half a screenwidth to the
right, thus scroll the text half a screenwidth to the
left. This only works when 'wrap' is off. {not in
Vi}
zH Move the view on the text half a screenwidth to the
left, thus scroll the text half a screenwidth to the
right. This only works when 'wrap' is off. {not in
Vi}
对于以下两个命令,光标不会在文本中移动,只有文本会在屏幕上滚动。
zs Scroll the text horizontally to position the cursor
at the start (left side) of the screen. This only
works when 'wrap' is off. {not in Vi}
ze Scroll the text horizontally to position the cursor
at the end (right side) of the screen. This only
works when 'wrap' is off. {not in Vi}
zz
,而不是z.