slidevjs / slidev

Presentation Slides for Developers
https://sli.dev
MIT License
32.8k stars 1.33k forks source link

Sync editor slide in position with preview #1351

Open pi0 opened 7 months ago

pi0 commented 7 months ago

When writing slides in Markdown, i often feel the need to sync the current slide that I am editing to be synced with the.

It would be amazing if the current line of code that is being edited in IDE, could sync the slide (not sure if possible)

antfu commented 7 months ago

You do have https://github.com/slidevjs/slidev-vscode that has a preview in sync with your cursor on your sidebar:

Screenshot 2024-02-27 at 23 03 38

It should be possible to forward that information to the server indeed, but we might want a toggle for that to enable explicitly

pi0 commented 7 months ago

Yes noticed preview! It is awesome only too small! If somehow could be passed would be nice. (only an idea feel free to close if not too much value)

mat-hek commented 1 week ago

Hi there, thanks for the awesome tool 🙌 Not sure if it's exactly the same thing, but coming from Marp, I really miss the slides in the preview following the scroll offset of the editor window. Here's how it works in Marp:

https://github.com/user-attachments/assets/14bb59c8-359d-4737-aedf-bddfaf9ae0e7

Sometimes it gets out off sync a bit, but it's still very convenient