Tip #52: Scrolling synchronously
tip karma |
Rating 146/46, Viewed by 2933
|
created: |
|
March 18, 2001 12:27 |
|
complexity: |
|
basic |
author: |
|
Anonymous |
|
as of Vim: |
|
5.7 |
If you want to bind two or more windows such that when one
window is scrolled, the other windows are scrolled simultaneously,
set the 'scrollbind' option for these windows:
:set scrollbind
When a window that has 'scrollbind' set is scrolled, all other
'scrollbind' windows are scrolled the same amount, if possible.
For more information about the 'scrollbind' option refer to
:help scoll-binding
<< Entering german umlauts |
Better colors for syntax highlighting >>
Additional Notes
[email protected],
April 20, 2001 13:43
|
And for those who are in versions prior to the scrollbind
days, these maps help. They are intented for use with 2
windows open for scrolling. (I believe this was lifted from
Dr. Campbell).
" { Scroll two windows up and down in parallel. }
nmap j <C-E><C-W>W<C-E><C-W>w
imap j <Esc><C-E><C-W>W<C-E><C-W>wa
nmap k <C-Y><C-W>W<C-Y><C-W>w
imap k <Esc><C-Y><C-W>W<C-Y><C-W>wa
|
[email protected],
September 22, 2005 10:07
|
That's ":help scroll-binding"...
|
|
|