19

I'm trying to compare similar, but different files in VS Code.

Is it possible to scroll both panes at the same time?

I'm referring to Editor Groups in the image below.

This sample image is taken from https://code.visualstudio.com/docs/getstarted/userinterface

VS Code Activity Bar, split panels, Editor Groups, Side Bar, and Status Bar

2 Answers2

26

In the Explorer sidebar:

Right-click on package.json -> Select For Compare

Right-click on findoptionswidget.ts -> Compare With Selected

You can then scroll the two panes simultaneously.

algorythms
  • 1,547
  • 1
  • 15
  • 28
8

It's a highly requested feature, but there's currently no native way to do this.

But you can download the extension Sync Scroll which will scroll all open editor panes

demo

Additional Resources

KyleMit
  • 30,350
  • 66
  • 462
  • 664
  • 1
    Sync Scroll works perfectly. Thank you! – jeff Nov 26 '21 at 14:32
  • 1
    Unfortunately this always jumps to the same line in both files for me, making this basically useless for my use cases. EDIT: nvm just had to switch the mode to OFFSET. – eager2learn Dec 02 '22 at 21:28