Vim Tips Wiki
Advertisement
Tip 52 Printable Monobook Previous Next

created March 18, 2001 · complexity basic · author Anonymous · version 5.7


When you are displaying more than one window, you can set the scrollbind option in each window so they scroll together.

In each window that should scroll simultaneously, enter the command:

:set scrollbind

You can enter scb as an abbreviation for scrollbind, and the ! flag causes set to toggle a boolean option. Therefore, it is convenient to enter the following to toggle scrollbind on or off:

:set scb!

When you scroll a window which has 'scrollbind' set, all other 'scrollbind' windows are scrolled the same amount, if possible.

References

Comments

Advertisement