Announce: markdown-scroll-sync total rewrite


#1

Continuing the discussion from Announce: markdown-scroll-sync package:

My package markdown-scroll-sync never worked as well as I (and everyone else) wanted. I just did a total rewrite that works much better and is less buggy. It is markdown-scroll-sync version 2.0.1.

Try it, you’ll like it. (If you have ever been forced to watch yo-gabba-gabba with your kids that expression will make you cringe).


#2

Nice, are you back in the Atom packages business ? :smile:


#3

Yes, for now. The start-up I joined has been waiting for promised financing for months and we had to put everything on hold until the money comes in, if ever. I’ve been through this several times before. Don’t ever count your money from an investor until you have a cleared check.

I wonder if anyone will use any of my packages since I let them all shrivel up from lack of support. I guess I’ll just keep cleaning them up and hope everyone forgives me.


#4

Hi @mark_hahn, have you considered making a PR on markdown-preview with that stuff?


#5
  • They know about my package and I assume they would ask if interested

  • It does not take advantage of anything in markdown-preview. It is written without any knowledge of markdown.

It will work in any situation where there is a normal source editor tab and an html tab that is a result of the source tab. It just matches text in the source to textcontent html nodes to generate a map from source lines to html element offsets. That mapping is stored and then when scrolling the source it looks up the node offset based on the line of the source. Using that offset it sets scrollTop.

This would even work with html source on the left and the rendered html on the right.

Edit: I accidentally sent this when half-written. I hate keys that send the post. I wonder if they can be disabled.