Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Auto Preview Tab MarkdownNew to Visual Studio Code? Get it now.
Auto Preview Tab Markdown

Auto Preview Tab Markdown

dustin-nguyen

|
15 installs
| (0) | Free
Automatically opens the Markdown preview beside the editor when a .md file becomes active.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Auto Preview Tab Markdown

Opens the Markdown preview beside your editor as soon as a .md file becomes active, and closes it when you're done. No more clicking "Open Preview to the Side".

Features

  • Auto-open Preview - A Markdown file becoming the active editor opens its preview in a split beside it.
  • One preview that follows you - A single preview panel is reused and always shows the file you're editing.
  • Auto-close Preview - The preview closes when the last Markdown tab is closed. Closing one of several keeps it.
  • Diff-aware - Markdown files opened in a diff view (e.g. Git "Open Changes") get no preview by default; opt in with a setting. Only one preview tab opens, never an extra source tab.

Installation

  • Install from the Open VSX Registry or Marketplace VS Code.
  • Requires VS Code 1.85.0 or newer.

Commands & keybindings

Command Keybinding Description
Auto Preview Markdown: Enable/Disable Ctrl+Shift+M Turns auto-open/auto-close on or off. Enabling also opens the preview right away.
Auto Preview Markdown: Open Preview To Side Ctrl+Shift+V Opens the preview beside the current Markdown file, e.g. after you closed it. Replaces VS Code's built-in Ctrl+Shift+V while the extension is enabled

On Mac, use Cmd instead of Ctrl

To change a key, open Keyboard Shortcuts (Ctrl+K Ctrl+S) and search for Auto Preview Markdown.

Configuration

Search for Auto Preview Markdown in Settings. Changes apply immediately, no reload needed.

Setting Default Description
autoPreviewMarkdown.enable true Auto-open the preview when a Markdown file becomes active, and auto-close it with the last Markdown tab. The Enable/Disable command flips this.
autoPreviewMarkdown.openPreviewToSide true Use Ctrl+Shift+V to open the preview beside the editor. Set to false to give Ctrl+Shift+V back to VS Code's built-in shortcut and keep the rest of the extension.
autoPreviewMarkdown.openInDiffEditor false Also open the preview for Markdown files shown in a diff editor (e.g. Git "Open Changes").
autoPreviewMarkdown.closePreviewOnNonMarkdown true Close the preview when you switch to a file that is not Markdown. It reopens when you come back to a Markdown file.

Example settings:

{
  "autoPreviewMarkdown.enable": true,
  "autoPreviewMarkdown.openPreviewToSide": false,
  "autoPreviewMarkdown.openInDiffEditor": true
}

Notes

  • Only files VS Code recognises as Markdown (.md, .markdown, ...) are handled.
  • In a diff, the preview shows the modified (right-hand) side — for a staged diff, the staged version. Read-only git: documents are treated like diffs.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft