0

I have two files, and they are similar in terms of the number of lines. I open them in two columns. When I scroll down in one column, I hope that the file in another column scrolls down too automatically. How can I do it?

Update: I don't want VSC to compare two files or generate any visual indicators. I just want them to scroll simultaneously.

curious1
  • 14,155
  • 37
  • 130
  • 231
  • Does this answer your question? [VS Code: How to scroll split panels simultaneously](https://stackoverflow.com/questions/59187587/vs-code-how-to-scroll-split-panels-simultaneously) – starball Jun 24 '23 at 19:57

1 Answers1

2

You can use the workbench.files.action.compareFileWith command to compare the active file with the selected file, then the two files can be scrolled simultaneously.

Also, make sure your diffEditor.renderSideBySide setting is true, it's to ensure the editors are opened side by side.

But if you don't want to see the diff decorations, there's currently no native way to do this, the corresponding feature request is tracked here. In the meantime, you can try the Sync Scroll extension.

Wenfang Du
  • 8,804
  • 9
  • 59
  • 90