Search code examples
vimlarge-files

How may I scroll with vim into a big file?


I have a big file with thousands of lines of thousands of characters.

I move the cursor to 3000th character.

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 ?

I have the behavior with gvim on Window, vim on OpenVMS and Cygwin.


Solution

  • CTRL-E - scroll down
    CTRL-Y - scroll up
    

    100<CTRL-E> will scroll down 100 lines for example

    If you like using PageUp, PageDown or Ctrl+D etc. you can set the "nostartofline" option

    :set nostartofline