Fork me on GitHub
#clerk
<
2023-11-01
>
Nathan Smith16:11:55

Is there any way to sync the scroll position of the browser and editor windows? I have them side by side and keep having to find an item in the TOC in the browser then find it again in the editor. (using VScode)

respatialized17:11:11

You'd have to extend your editor to be aware of what form you're at and convey that information to Clerk somehow in order for this to work. Not impossible, but nothing close to "out of the box" and likely requires modifications to Clerk itself to work well.

Nathan Smith18:11:44

About what I expected. The nice thing is that it’s totally possible!

mkvlr18:11:48

I prototyped this for Emacs a while back, will dig it out later, maybe something you can adapt for VSCode

nice 1
teodorlu12:11:53

I’m also interested in a way to keep scroll in sync between editor and browser. But I hesitate to see an elegant solution to this. In general, I’m grateful for Clerk’s “let’s not do too much” attitude. Perhaps “current line” could be sent to nextjournal.clerk/show! along with the current file? That way, users can add “current line info” / “sync line info” if they want.