Atom Packages Directory

a package directory for a text editor of the 21st Century

Markdown Auto Preview

Install with:
    apm install atom-markdown-auto-preview

Atom Markdown Auto-Preview


Automatically activates the preview tab corresponding to a Markdown source file (if open in a different pane). Works a treat with markdown-scroll-sync!

Screencap in action


Fiddly bits

The module works on the following logic: * If the previewer exists, and * If the previewer is in a different pane, then * Make the previewer visible

The module scans all open tabs for ones which have an ‘editor’ property, to identify preview-type tabs

The ‘editor’ property must match the editor which has just been made active: * Sometimes this fails after reloading a window or in similar circumstances * The preview tabs persist, but this link back to the source editor is no longer valid (a limitation of Atom)

Keywords: markdown, preview, automatic Suggest keywords
Fork me on GitHub