If you’ve ever diffed a file in Vim or otherwise had two corresponding splits, you may have wished for a way to scroll them together. Vim can do just that with scrollbind.

With scrollbind enabled, each window in Vim will scroll simultaneously. Line for line as you move through the file, the other window will scroll as well.1

Simply run the following:

:set scrollbind

Or to put it back:

:set noscrollbind

You can also toggle the option with:

:set scb!

1. Scrolling synchronously. (n.d.). In Wikia. Retrieved June 11, 2017, fron http://vim.wikia.com/wiki/Scrolling_synchronously