tags:

views:

738

answers:

3

Hi,

I would like to know whether it's possible to scroll down the left and right parts of a vertically split window in vim ?

I have 2 files I would like to compare roughly... Each line of these files looks almost the same...

thanks

+10  A: 

See the documentation for scroll-binding. You'll need to set this for each window that you want bound (e.g. a minimum of 2)

If you're comparing 2 files, however, vimdiff may be of more use

Brian Agnew
scroll-binding... i wasn't able to find it... thanks...
LB
+5  A: 

G'day,

Tried using vimdiff on the two files?

vimdiff file1 file2

This will give you the scroll binding by default.

Rob Wells
the problem is that all the lines differ, it's starting to be a mess.. The lines are nearly the same but may differ by one character...and I don't want my view to be too much disturbed..thanks though.
LB
+2  A: 

Go to the first split, and type in

:set scrollbind

Go to the next one, and do the same.

To disable:

:set noscrollbind
vyck