Markdown Viewer is available as a VS Code extension, allowing you to preview and export Markdown documents directly within your editor.
| Feature | Status |
|---|---|
| Markdown preview | ✅ |
| Word export | ✅ |
| All diagram types | ✅ |
| LaTeX formulas | ✅ |
| 29 themes | ✅ |
| Live preview | ✅ |
- Visit VS Code Marketplace - Markdown Viewer Extension
- Click Install
- Or open VS Code, go to Extensions (
Ctrl+Shift+X/Cmd+Shift+X) - Search for "Markdown Viewer Extension"
- Click Install
For VSCodium or offline installations:
- Visit Open VSX - Markdown Viewer Extension
- Click Install
code --install-extension xicilion.markdown-viewer-extensionAs you edit your Markdown file, the preview updates in real-time.
Open Preview:
- Command Palette:
Markdown Viewer: Open Preview - Keyboard:
Ctrl+Shift+V/Cmd+Shift+V - Right-click file → "Open Preview"
Edit and preview simultaneously:
Ctrl+K V/Cmd+K V— Open preview to the side
Export the current document to Word:
- Command Palette:
Markdown Viewer: Export to Word - Right-click in editor → "Export to Word"
- Open a
.mdfile in VS Code - Click the preview icon in the top-right corner
- Or use keyboard shortcut
Ctrl+Shift+V
- Or use keyboard shortcut
- Preview opens in a new tab
- Open the Markdown file
- Open Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Type "Markdown Viewer: Export to Word"
- Choose save location
- Word document is created
Access settings: File → Preferences → Settings → Markdown Viewer
| Setting | Default | Description |
|---|---|---|
markdownViewer.theme |
default |
Document theme |
markdownViewer.fontSize |
14 |
Preview font size |
markdownViewer.lineHeight |
1.5 |
Line height |
{
"markdownViewer.theme": "business",
"markdownViewer.fontSize": 16,
"markdownViewer.lineHeight": 1.6
}All diagram types work in VS Code:
```plantuml
@startuml
Alice -> Bob: Hello
Bob --> Alice: Hi!
@enduml
``````mermaid
graph TD
A[Start] --> B[End]
``````dot
digraph G {
A -> B
}
``````vega-lite
{
"data": {"values": [{"x": 1, "y": 2}]},
"mark": "point",
"encoding": {
"x": {"field": "x"},
"y": {"field": "y"}
}
}
```| Action | Windows/Linux | macOS |
|---|---|---|
| Open Preview | Ctrl + Shift + V |
Cmd + Shift + V |
| Preview to Side | Ctrl + K V |
Cmd + K V |
| Export to Word | Via Command Palette | Via Command Palette |
- ✅ VS Code built-in Markdown features
- ✅ Git diff view
- ✅ Remote workspaces
- ✅ WSL
- ✅ GitHub Codespaces
| Extension | Language ID | Supported |
|---|---|---|
.md |
markdown |
✅ |
.markdown |
markdown |
✅ |
.plantuml |
plantuml |
✅ |
.mermaid |
mermaid |
✅ |
.vega, .vl |
vega |
✅ |
.gv, .dot |
graphviz |
✅ |
.infographic |
infographic |
✅ |
| Aspect | VS Code | Browser |
|---|---|---|
| Editing | Native code editing | View only |
| Live Preview | Real-time as you type | Manual refresh |
| File Management | Full VS Code features | Browser-based |
| Git Integration | Built-in | None |
| Workspace | Multi-file projects | Single file |
Use VS Code when you're actively writing and editing. Use Browser when you're reading or sharing documents.
- Verify the extension is installed and enabled
- Check file type is
.mdor.markdown - Try reloading VS Code window (
Ctrl+Shift+P→ "Reload Window")
- Check diagram syntax
- Wait for initial render (may take a moment)
- Check VS Code Developer Tools for errors
- Ensure you have write permissions
- Check available disk space
- Try a different save location
cd vscode
npm install
npm run buildnpm run test- Open project in VS Code
- Press
F5to launch Extension Development Host - Test in the new VS Code window
GitHub: markdown-viewer-extension
VS Code-specific code is in the vscode/ directory.