如何使用vim滚动到大文件? [英] How may I scroll with vim into a big file?
问题描述
我有一个大文件,有成千上万的行,包含成千上万个字符.
I have a big file with thousands of lines of thousands of characters.
我将光标移到第3000个字符.
I move the cursor to 3000th character.
如果我使用 PageDown 或 Ctrl + D ,文件将滚动,但光标将回到第一个无空格字符
If I use PageDown or Ctrl+D, the file will scroll but the cursor will come back to the first no-space character.
有一个选项可以设置为在滚动后将光标保持在同一列中?
There's is an option to set to keep the cursor in the same column after a such scroll ?
我在 Window 上使用gvim,在 OpenVMS 和 Cygwin 上使用vim.
I have the behavior with gvim on Window, vim on OpenVMS and Cygwin.
推荐答案
CTRL-E - scroll down
CTRL-Y - scroll up
100 < CTRL-E>
例如将向下滚动100行
100<CTRL-E>
will scroll down 100 lines for example
如果您喜欢使用 PageUp , PageDown 或 Ctrl + D 等,则可以设置"nostartofline选项
If you like using PageUp, PageDown or Ctrl+D etc. you can set the "nostartofline" option
:set nostartofline
这篇关于如何使用vim滚动到大文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!