You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a feature request related to synchronized scrolling in the Split Editor. I checked for extensions and didn't see any. Was wondering if this is the pipeline or not.
Reacted by Kevin Weis, Artem, Samuel Prakash Palukuri, Lindvorn, Tom Alon, Lauren Winkler, Francesco Nicastri, Simon Chan, Toperial, Atif Mohammed and 343 more
Reacted by Alejandro Dini, FixoLab, MK, Peter Pezaris, Fernando Figaroli FerX, JoBrad, James Weng, Yuxiang (Jimmy) Wu, Alex Kuhrt, Michal Stankay and 31 more
Reacted by Alejandro Dini, FixoLab, Tanner Hoisington, Dominik Horňák, MK, Peter Pezaris, Fernando Figaroli FerX, Pei Qing 卿培, Ardeshir Izadi, alekline and 64 more
Reacted by nirmalhz, Кас Элвиров, Alex Ivanov, Tanvi Chaturvedi, intellekta, apneef, Serhii Sovhut, joaobarcia, Anton Nikolas Waniek, Jacob Barton and 22 more
Reacted by 3rg1s, Kirill Zhdanov, Ferréol DUBOIS COLI, Chris Winne, Piyush Amitabh and Andrej Mazhenkovski
Reacted by Alejandro Dini, Matti, Joan Pla, Dominik Horňák, Stephan, Nick Steele, Leon Overweel, Aaron, Joseph Ting, mrhoga and 13 more
Reacted by Geoffrey van Wyk, Diwakaran, Milan Masek, ycheapopo, Jacob Barton, Jayant Dash, Hitesh Narendra Dhruna, Asymmetric1, siminn-andrivg and Henrique Faria
I'm planning to introduce synchronized scrolling to Visual Studio Code in March and would like to make it as straightforward and practical as possible. To do that, I'm keen to understand the scenarios you envision using it for and how you'd prefer to switch it on or off.
It seems like a lot of the interest is around comparing language files, where both files would scroll together so that each line matches up across files. Do you use a standard format for your language files, or have you developed a custom format?
If there are other scenarios where the current File: Compare Active File With... feature doesn't meet your needs, please let me know.
Regarding how to access this feature, would a command like Synchronize Scroll Active File With... work for you? This would open a side-by-side editor with synchronized scrolling. It would align line number X in the left file with line number X on the right side. Would there be a need to adjust the alignment manually?
I'm open to any feedback or suggestions on how to better implement this feature.
A less opinionated command like Toggle Synchronized Editor Scrolling would be ideal, which propagates a scroll event in one editor to all active editors in the same window. This would allow me to, for example, open a single large file in two editors, and synchronize scrolling between them as I inspect a list of imported functions versus their references much later on.
If there are other scenarios where the current File: Compare Active File With... feature doesn't meet your needs, please let me know.
Regarding how to access this feature, would a command like Synchronize Scroll Active File With... work for you? This would open a side-by-side editor with synchronized scrolling. It would align line number X in the left file with line number X on the right side. Would there be a need to adjust the alignment manually?
I have used split editors for language files, but more commonly I’ve used it for different versions of the same file, to identify how they differ. Sometimes, that means things like comparing a file in the repository or workspace I have open with a backup file downloaded from a third-party backup system and not located in the same repository/workspace. It also means it’s often the case that lines numbers are not parallel. Code on line 50 in one version may be on line 400 in the version I’m comparing with.
A command like ‘Synchronize Scroll Active File With…’ would be useful, but quite limited.
A much, much more powerful and useful feature would be two toggles located in/on/at/by the scrollbar between adjacent editor panes:
One to turn synchronised scrolling on/off
One to match up line numbers
In combination, those would determine which of the three possible scrolling behaviours applies to the two panes:
Sync disabled: panes scroll individually (matching line numbers should probably be greyed out when syncing is disabled)
Sync enabled, matching disabled: panes scroll up and down in unison based on whatever position the file was in when syncing was enabled; for example, you can stay on line 1 in one pane and scroll down to line 201 in the other, then turn on syncing, and the files will remain parallel, one file 200 lines ahead of the other; wrapped lines in one pane do not affect the other pane
Sync + matching enabled: panes scroll in unison based on line numbers, so that the top of the files are positioned next to each other and wrapped lines in one editor results in extra space in the other
That would be the dream scenario for me. It’s quite similar to the plugin linked to by Alex Ivanov (@oshliaer), except that it looks like the plugin just has three modes to choose from as a command, rather than toggles. The benefit of toggles is that they allow you to individually set the syncing and line matching mode not for the window but for two adjacent split editor panes.
That means that if you have your editor split into four panes, you can sync-scroll all four panes, only panes 1+2, panes 1+2 and 3+4 but not 2+3 (giving you two separate, sync-scrolling ‘groups’), etc.
Tomorrows VSCode Insiders will support the Toggle Locked Scrolling Across Editors which will synchronize the scrolling across all text editors and notebooks. You can also set a keybinding for workbench.action.holdLockedScrolling which will synchronize the scrolling only when being pressed.
Activity
CompileNix commentedon Sep 26, 2017
Related #17362
kkukshtel commentedon Dec 14, 2017
Would love this as well. Synchronized scrolling would allow for easy text diffs, similar to how the version diff works for the source control.
stereokai commentedon Feb 11, 2018
This doesn't get enough love
atif089 commentedon Feb 21, 2018
bumping this cool request
alete89 commentedon Mar 3, 2018
spreading love
usaspiff commentedon Mar 7, 2018
I would love to see this feature implemented as well, and be able to see text diffs.
98 remaining items
hisbvdis commentedon Dec 27, 2023
Unfortunatelly, this extension is not working anymore.
benibenj commentedon Feb 28, 2024
I'm planning to introduce synchronized scrolling to Visual Studio Code in March and would like to make it as straightforward and practical as possible. To do that, I'm keen to understand the scenarios you envision using it for and how you'd prefer to switch it on or off.
It seems like a lot of the interest is around comparing language files, where both files would scroll together so that each line matches up across files. Do you use a standard format for your language files, or have you developed a custom format?
If there are other scenarios where the current
File: Compare Active File With...feature doesn't meet your needs, please let me know.Regarding how to access this feature, would a command like
Synchronize Scroll Active File With...work for you? This would open a side-by-side editor with synchronized scrolling. It would align line number X in the left file with line number X on the right side. Would there be a need to adjust the alignment manually?I'm open to any feedback or suggestions on how to better implement this feature.
oshliaer commentedon Feb 28, 2024
Benjamin Christopher Simmonds (@benibenj)
Great!
brianblakely commentedon Feb 28, 2024
Benjamin Christopher Simmonds (@benibenj)
A less opinionated command like
Toggle Synchronized Editor Scrollingwould be ideal, which propagates a scroll event in one editor to all active editors in the same window. This would allow me to, for example, open a single large file in two editors, and synchronize scrolling between them as I inspect a list of imported functions versus their references much later on.the-coder-o commentedon Feb 28, 2024
kokoshneta commentedon Feb 28, 2024
Benjamin Christopher Simmonds (@benibenj)
I have used split editors for language files, but more commonly I’ve used it for different versions of the same file, to identify how they differ. Sometimes, that means things like comparing a file in the repository or workspace I have open with a backup file downloaded from a third-party backup system and not located in the same repository/workspace. It also means it’s often the case that lines numbers are not parallel. Code on line 50 in one version may be on line 400 in the version I’m comparing with.
A command like ‘Synchronize Scroll Active File With…’ would be useful, but quite limited.
A much, much more powerful and useful feature would be two toggles located in/on/at/by the scrollbar between adjacent editor panes:
In combination, those would determine which of the three possible scrolling behaviours applies to the two panes:
That would be the dream scenario for me. It’s quite similar to the plugin linked to by Alex Ivanov (@oshliaer), except that it looks like the plugin just has three modes to choose from as a command, rather than toggles. The benefit of toggles is that they allow you to individually set the syncing and line matching mode not for the window but for two adjacent split editor panes.
That means that if you have your editor split into four panes, you can sync-scroll all four panes, only panes 1+2, panes 1+2 and 3+4 but not 2+3 (giving you two separate, sync-scrolling ‘groups’), etc.
starball5 commentedon Mar 4, 2024
Related on Stack Overflow: Synchronise vertical/horizontal scrolling in split view
More loosely related: How can I make VS Code display a file in a two editor groups, where the bottom line of the left group is always the top of the right one? for people who want to sync a split of the same file, but have one start at the line where the previous ends.
raffle-x-dev commentedon Mar 5, 2024
Up!
benibenj commentedon Mar 14, 2024
Tomorrows VSCode Insiders will support the
Toggle Locked Scrolling Across Editorswhich will synchronize the scrolling across all text editors and notebooks. You can also set a keybinding forworkbench.action.holdLockedScrollingwhich will synchronize the scrolling only when being pressed.Try it out here: https://code.visualstudio.com/insiders/