Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronized Scrolling in Split Editor #33110

Closed
jcastanza-apollidon opened this issue Aug 24, 2017 · 109 comments
Closed

Synchronized Scrolling in Split Editor #33110

jcastanza-apollidon opened this issue Aug 24, 2017 · 109 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan workbench-editors Managing of editor widgets in workbench window
Milestone

Comments

@jcastanza-apollidon
Copy link

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.

@vscodebot vscodebot bot added editor editor-core Editor basic functionality labels Aug 24, 2017
@compilenix
Copy link

Related #17362

@alexdima alexdima self-assigned this Oct 26, 2017
@rebornix rebornix added the feature-request Request for new features or functionality label Nov 16, 2017
@alexdima alexdima added workbench-editors Managing of editor widgets in workbench window and removed editor editor-core Editor basic functionality labels Nov 24, 2017
@alexdima alexdima removed their assignment Nov 24, 2017
@kkukshtel
Copy link

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
Copy link

This doesn't get enough love

@atif089
Copy link

atif089 commented Feb 21, 2018

bumping this cool request

@alete89
Copy link

alete89 commented Mar 3, 2018

spreading love

@usaspiff
Copy link

usaspiff commented Mar 7, 2018

I would love to see this feature implemented as well, and be able to see text diffs.

@jeanbenitez
Copy link

👍 +1!
I would love to see this too!

@ghaschel
Copy link

Would love to see this too

@Tuttu
Copy link

Tuttu commented Mar 23, 2018

Adding my own voice for this addition. 👍

@LailaAli
Copy link

Agree, this would be a very handy feature. Are there any updates on this request?

@brandonhc33
Copy link

i need this, please!

@alete89
Copy link

alete89 commented Mar 29, 2018

I'm sure that this will catch @rebornix 's attention soon

@ankedsgn
Copy link

ankedsgn commented Apr 5, 2018

Yes, this would be a great addition. 👍🏼

@deckeogh
Copy link

deckeogh commented Apr 6, 2018

I'd love to see this tooooo

@ddeamilivia
Copy link

It would be a good addition, and probably not too difficult to implement since it's already implemented on the file comparison, which btw is a nice workaround in the meantime

@bpasero bpasero changed the title Feature Request - Synchronized Scrolling in Split Editor Synchronized Scrolling in Split Editor Apr 18, 2018
@subudhiroshan
Copy link

Yes please!

@savbran
Copy link

savbran commented Jun 12, 2018

👍 +1
It would be great to have this feature to check editing between similar files.

@3rg1s
Copy link

3rg1s commented Jul 1, 2021

Hello I am rooting for this feature to be implemented without an extension.

@brianblakely
Copy link

I opened this issue up to +1 it and realized I already did so ages ago.

Neat extension, though!

@storenth
Copy link

storenth commented Sep 7, 2021

Why this feature still not released? Sad.

@mymage
Copy link

mymage commented Sep 7, 2021

Why this feature still not released? Sad.

Maybe I don't understand. I'm using it since a year... Did you update your version?

@3rg1s
Copy link

3rg1s commented Sep 7, 2021

Why this feature still not released? Sad.

Maybe I don't understand. I'm using it since a year... Did you update your version?

Well I think the ticket should've been closed. Right?

@mymage
Copy link

mymage commented Sep 7, 2021

Well I think the ticket should've been closed. Right?

Right

@StendertBroos
Copy link

StendertBroos commented Jun 10, 2022

As I am using an ultra wide screen, I would really like to split a single long (.ipynb) file into multiple columns, showing different line ranges per column, scrolling through them in sync.

In general, this allows for efficient use of long files on wide screens.

Optimal would be something like a "broaden file" option with automatic consecutive alignment across columns, based on lines on screen. So if one pane shows X lines, then pane 1 contains line 1 till line X, pane 2 contains line X+1 till line 2X, pane 3 contains line 2X+1 till line 3X, etc.

Echo'ing @3rg1s, I think such a feature would be best implemented natively, and would probably be widely used, even on screens that are not very wide.

On a side note, dqisme's plugin does not work very well when scrolling fast with offset as it changes the offset, and does not work at all for Jupyter Notebooks.

Best!

@Dioarya
Copy link

Dioarya commented Dec 3, 2022

Bump

@Fefedu973
Copy link

We need this feature

@Tein-devoteam
Copy link

I'm very much in agreement with @StendertBroos's suggestion. How can we promote this feature?

@purpledev1337
Copy link

It would be a really appreciated feature!

@hisbvdis
Copy link

Thanks, works fine.

From: dq notifications@github.com To:microsoft/vscode vscode@noreply.github.com CC:intellekta uwe.cramer@intellekta.de, Comment comment@noreply.github.com Date: 03.06.2020 00:02 Subject: Re: [microsoft/vscode] Synchronized Scrolling in Split Editor (#33110) Everybody hands up, here comes Sync Scroll ( https://marketplace.visualstudio.com/items?itemName=dqisme.sync-scroll) This extension will help you synchronize scrolling on split editor. Try it out and leave your reviews or issues or PRs. Very glad to hear that. Happy hacking and long lives the open source community. — You are receiving this because you commented. Reply to this email directly, view it on GitHub ( #33110 (comment)) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/ADLQHAC3DD372DWJ2R7TMX3RUVZGJANCNFSM4DYHXJBA) .

Unfortunatelly, this extension is not working anymore.

@benibenj
Copy link
Contributor

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
Copy link

@benibenj

Great!

@brianblakely
Copy link

@benibenj

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.

@the-coder-o

This comment was marked as spam.

@kokoshneta
Copy link

kokoshneta commented Feb 28, 2024

@benibenj

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:

  1. Sync disabled: panes scroll individually (matching line numbers should probably be greyed out when syncing is disabled)
  2. 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
  3. 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 @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
Copy link

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
Copy link

Up!

@benibenj
Copy link
Contributor

benibenj commented Mar 14, 2024

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.

Try it out here: https://code.visualstudio.com/insiders/

@microsoft microsoft locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan workbench-editors Managing of editor widgets in workbench window
Projects
None yet
Development

No branches or pull requests