View Markdown files in VS Code with a live custom preview.
Features
- Rendered preview for
.mdand.markdownfiles. - Source, preview, and split modes from the editor title bar and command palette.
- Live updates as Markdown source changes.
- Scroll synchronization between source and preview.
- Table of contents for documents with multiple
h2/h3headings. - Theme-aware styling using VS Code colors.
Usage
- Open a Markdown file.
- Run
MD Viewer: Toggle Code View, or useCmd+K/Ctrl+K, to switch between preview and source. - Run
MD Viewer: Split Source / Preview, or useCmd+L/Ctrl+L, to edit source beside the preview. - Use
MD Viewer: Source Modeto return to the text editor.
The extension registers its preview as an optional custom editor so normal Markdown files still open as source by default.
Settings
| Setting | Default | Description |
|---|---|---|
mdViewer.openLinksInEditor |
true |
Open local Markdown links inside VS Code instead of the webview. |
Development
No build step is required; the extension is plain JavaScript.
- Open this folder in VS Code.
- Press
F5to launch the Extension Development Host. - Open any
.mdfile and runMD Viewer: Preview Mode.
Package locally:
npm install
npm run build:local
npm run install:local
License
MIT