Announce: markdown-scroll-sync package


A package every single atom user should install. The readme follows…

markdown-scroll-sync Atom editor package

Auto-scroll markdown-preview tab to match markdown source. See the project at github.


There is no atom command or keybinding. There are no config settings.

The package starts on load and watches for when it should sync. It will automatically sync when there are two panes where one active tab is a markdown file and another active tab is the markdown preview for that file. At that point it will scroll the preview to match the markdown file’s scroll position.

When the markdown file is scrolled the preview is automatically scrolled to match. If the preview is scrolled then syncing is temporarily turned off until the main file is focused again. The markdown file is never automatically scrolled to match the preview.


Copyright Mark Hahn by MIT license.


See other packages by mark-hahn at


Awesome! I really missed this


That would be really helpful when I was doing the FAQ post :smiley: Good work.


Nice! Thanks for taking care of this, but have you considered doing a PR on markdown-preview instead of a new package? I say that because I think mostly anyone using the markdown preview expect this behavior.


Yes I did, I know it is a missing core feature. But it seemed like hard work (grin).

No one at atom/markdown-preview said they were working on a PR. There is a really long thread of people asking each other to do the PR.

I’ve had bad luck with core PRs. I sent one in for snippets and heard nothing for over a month. I bumped it and I was told they don’t take PRs that don’t pass the specs. My PR passed the specs when I submitted it. Some word back would have been nice. Not a big deal but it soured me a bit.

It took me just a few hours to hack this together. I was surprised a simple trick worked. I converted the markdown, up until the top of the screen, into HTML using the same module markdown-preview does. Then I counted the tags in my shortened version. The I found the tag the same count into the DOM. I told that DOM element to scroll-into-view. Voila.


Working great on this end – thanks so much!

Announce: markdown-scroll-sync total rewrite

Thank god. This has been nagging me for quiet some time. Great job!