vscode-sync-scroll
vscode-sync-scroll copied to clipboard
Feature Request: Proportional Scrolling
I would be interesting and useful if the scrolling sync was proportional to the number of lines of each file.
For example: A file with 100 lines and other file with 50 lines in a split panel.
The behavior would be something like this: If in the first file I scroll to the line 50, the other file should be on line 25. And so...
I don't know exactly how to code extensions in VSCode, but it would work something like this in this pseudocode:
linesFileA = getLines(fileA)
linesFileB = getLines(fileB)
percentLineA = currentLine(fileA) * 100 / linesFileA
syncLineB = linesFileB * percentLineA / 100
setPosition(fileB, syncLineB)
And the same the other way around.
I know that's not how VSCode extensions works, but I hope the idea is understandable ^^"
@moxwel Thanks very much for this idea and yes I think it's very clear and useful. I will add this as another todo task.