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

[FEATURE]: Scroll Linking #241

Open
dmmagic opened this issue Dec 4, 2016 · 11 comments
Open

[FEATURE]: Scroll Linking #241

dmmagic opened this issue Dec 4, 2016 · 11 comments
Assignees

Comments

@dmmagic
Copy link

dmmagic commented Dec 4, 2016

I'm not terribly familiar with Github, so I don't know where to suggest feature requests. Apologies if this is out of place.

It would be great if you could click a lock button to link the code on the left with the output on the right. So when you scroll to a page on the right, it moves to the appropriate section of code on the right -- and vise versa. And then you could click the lock again to unlink them for independant scrolling.

@stolksdorf
Copy link
Collaborator

I will probably not implement this. To do it well will be complicated and will probably lag the UI while scrolling.

@dmmagic
Copy link
Author

dmmagic commented Dec 9, 2016

Totally understand. Maybe something for the future. :)

@kilkwik
Copy link

kilkwik commented Dec 23, 2016

If linking is complicated, is there a possible way to make a quick scroll hotkey... sometimes I get lost when I am looking through what I have created on the formatted side and i want to quickly find out where the code is written. Something that would generally take me to the right spot would be all I need.

Since I am using Chrome, I'll usually try and cntl+f on a unique word that is on the right hand side, and then use the arrow keys to move to the right side. It's functional as a workaround.

Clearly a P2/P3 request... but would probably save me some time considering I am working up something larger than a couple of pages. :)

@Gazook89
Copy link
Collaborator

Gazook89 commented Aug 1, 2021

5 year old issue, but requested again today on the reddit. Quick google search has this SO question, which contains a working example of a markdown editor with live scroll linking.

There is also Remarkable, with fairly smooth scrolling. Live Demo

Also, this is similar to #846 or addresses the same basic problem (being lost in the source pane).

@calculuschild
Copy link
Member

calculuschild commented Oct 7, 2021

In my mind I imagine rather than continuous smooth scrolling between the two views, it would detect when you have entered the next page, and then the opposing view would glide into that position. That way we match page-by-page rather than trying to sync line-by-line if that makes sense.

@G-Ambatte
Copy link
Collaborator

Once the functionality for #2162 is in place, then I think we should be able to add a basic Scroll Linking feature, similar to that described here.

@5e-Cleric 5e-Cleric changed the title Suggestion: Scroll Linking [FEATURE]: Scroll Linking Jan 16, 2024
@dbolack-ab dbolack-ab self-assigned this May 18, 2024
@dbolack-ab
Copy link
Collaborator

Do we want this to be

  1. a continuous scroll
  2. a "Jump to my cursor hot key" ?
  3. Both where a able to be toggled on and off?

Putting this on my radar for the release after next.

@calculuschild
Copy link
Member

calculuschild commented May 18, 2024

Detect when one panel has entered a new page, and then the opposing view would glide into that same page.

So more of #1, but syncing page by page rather than line by line (with a toggle button to turn on and off). #2 (jump to cursor) is already released, but as buttons rather than a hotkey.

@Gazook89
Copy link
Collaborator

Gazook89 commented May 18, 2024

Certainly if doing (1), it should be able to be toggled.

And to be clear what we have now: There is the "jump to..." buttons, which either scrolls the Preview to match the page in the Editor which has the cursor in it, or scrolls the editor to match which page is in view in the preview.

We don't have a "scroll the preview to match the page visible in the editor (and not sure we would). But for me it's good to remind myself of what the current buttons do.

@dbolack-ab
Copy link
Collaborator

So it sounds like 3 is the choice.

Adding a hotkey binding for the existing button in one PR then another for the toggleable scroll.

@calculuschild
Copy link
Member

calculuschild commented May 18, 2024

No hotkeys. Just the scroll sync, toggled via a new button in the UI.

So choice #1 but not #3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants