Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Synchronise vertical/horizontal scrolling in split view

Is there a way in VS Code to synchronise vertical or horizontal scrolling in splitted view ?

Like in Notepad++ for instance :

From buttons:

Notepad++ Vertical/Horizontal sync

From View menu:

Notepad++ Vertical/Horizontal sync

like image 997
Michaël Polla Avatar asked Jul 26 '17 11:07

Michaël Polla


People also ask

How do I scroll both views in Notepad ++?

To synchronise the scrolling of two documents, click on “View” in the top bar, then click “Synchronise Vertical Scrolling” and/or “Synchronise Horizontal Scrolling”. Click on “View” in the top bar, then click “Synchronise Vertical Scrolling” and/or “Synchronise Horizontal Scrolling”.

How do I scroll sideways in Visual Studio?

Scroll horizontally with the mouse wheel when holding the shift key. Enables horizontal scrolling by holding down the Shift key and spinning the mouse wheel in Visual Studio 2017, 2019 and 2022. This feature is available in many other programs. Once you're used to it, it is sorely missed.

How do I compare two files in VS code?

Open VS Code with the files you are going to compare. Right-Click one file you want to compare => Select for Compare.


2 Answers

2021 EDIT: While the below does still work, as per @Mr.D.Q's answer below, there does now exist a plugin Sync Scroll to accomplish this task.

--

From what I can find, the closest thing you can do is use the "Compare Files" feature.

In the File-Explorer sidebar:

  • Right-click on File A -> Select For Compare
  • Right-click on File B -> Compare With Selected
like image 150
Rich Werden Avatar answered Sep 29 '22 15:09

Rich Werden


If you want to more advanced synchronized scrolling feature, please check out this vscode extension Sync Scroll

like image 43
Mr.D.Q Avatar answered Sep 29 '22 15:09

Mr.D.Q