Package Control

The official Sublime Text package manager.

MarkdownPreviewOverlay

In-editor Markdown preview & reading mode for Sublime Text. Show preview inside the same tab without external browser or split panes

By flashmodel
Created August 27, 2026, last updated October 2, 2026.

SepAugJulJunMayAprMarFebJan Dec2025 NovOct 2026-W43 | installs: 175 | removals: 24 | upgrades: 1 2026-W43 | installs: 175 | removals: 24 | upgrades: 1 2026-W43 | installs: 175 | removals: 24 | upgrades: 1 2026-W42 | installs: 244 | removals: 49 | upgrades: 1 2026-W42 | installs: 244 | removals: 49 | upgrades: 1 2026-W42 | installs: 244 | removals: 49 | upgrades: 1 2026-W41 | installs: 363 | removals: 68 | upgrades: 2 2026-W41 | installs: 363 | removals: 68 | upgrades: 2 2026-W41 | installs: 363 | removals: 68 | upgrades: 2 2026-W40 | installs: 53 | removals: 5 | upgrades: 2 2026-W40 | installs: 53 | removals: 5 | upgrades: 2 2026-W40 | installs: 53 | removals: 5 | upgrades: 2 0200400 WeeklyInstalls 024 WeeklyUpgrades 2026-W40 | upgrades: 2 0.1.5 2026-W38 0.1.4 2026-W37 0.1.3 2026-W36 0.1.2 / 0.1.1 / ... 0.1.2 / 0.1.1 / 0.1.0
Installations: recent average 220 per week, 840 in total
Installations minus removals
Upgrades

Links

Versions

0.1.5 (>ST4049) ·
2026-10-02 07:08

More

MarkdownPreviewOverlay

Package Control

MarkdownPreviewOverlay is an editor-native Markdown preview and reading mode for Sublime Text. It renders formatted Markdown directly inside your active tab—no external browser, no split-pane, and zero context switching.

MarkdownPreviewOverlay Demo

This overlay concept was originally designed as the chat preview feature for TermMate, and extracted into a standalone package as discussed in the forum topic: Provide markdown preview mode using folded source and phantom. Join the forum and share your feedback in that thread!

Features & Capabilities

Compared to traditional external browsers or split-pane previewers, MarkdownPreviewOverlay renders your Markdown preview directly inside the same editor view while keeping your plain-text workflow intact:

Note: Rendering is delegated directly to the mdpopups Package Control dependency without bundling a separate Markdown parser.

Installation

The easiest way to install is via Package Control:

  1. Open the Command Palette: Command+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux).
  2. Select Package Control: Install Package.
  3. Search for MarkdownPreviewOverlay and press Enter.

Usage

MarkdownPreviewOverlay provides seamless ways to enter, navigate, and exit preview mode without leaving your active editor view.

1. Interactive Phantom Buttons

The package injects lightweight, non-intrusive interactive controls directly into the buffer for saved files (enabled by default, can be hidden via "show_preview_button": false in settings):

2. Command Palette

Press Command+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux) and search for Markdown Overlay (or type mdo):

Command Description
Markdown Overlay: Toggle Toggles seamlessly between Preview Mode and Edit Mode.
Markdown Overlay: Preview Mode Enters the rendered preview mode for the active Markdown document.
Markdown Overlay: Edit Mode Exits preview mode and returns to editing the source buffer.
Markdown Overlay: Refresh Forces a re-render of the preview layout (useful after resizing the window).

Note for Unsaved Buffers: To keep scratch view clean, the inline ▣ Preview button is only displayed for saved files on disk. For unsaved or untitled buffers, enter preview mode using the Command Palette or a keyboard shortcut.

Behavior & Document Lifecycle

Configuration

Access settings and key bindings via the menu: Preferences -> Package Settings -> MarkdownPreviewOverlay.

Settings

Settings can be customized via Preferences -> Package Settings -> MarkdownPreviewOverlay -> Settings (or directly in MarkdownPreviewOverlay.sublime-settings):

Setting Description
show_preview_button Display the interactive ▣ Preview button at the top of saved files in edit mode (default: true).
sync_preview_position Synchronize preview scroll position with the current Markdown source position (default: true).
hide_line_numbers Automatically hide line numbers and the gutter in preview mode (default: true).
show_status_indicator Display the active mode indicator in the status bar during preview mode (default: true).
table_max_width Maximum character width for rendered tables; null auto-fits the viewport width (default: null).
resolve_image_paths Rewrite local relative image paths to absolute file:// URIs for rendering (enabled by default: true). Set to false if prefer image paths to be untouched.
image_max_width Maximum display width in pixels for rendered images when resolve_image_paths is enabled (default: 900).
keyboard_scroll_lines Number of lines to scroll per arrow key press (Up/Down) in preview mode (default: 3.0).

Key Bindings

MarkdownPreviewOverlay does not register a shortcut to avoid collisions. Key bindings are provided as a keymap example.

To enable keyboard shortcuts, open Preferences -> Package Settings -> MarkdownPreviewOverlay -> Key Bindings (or copy from Example.sublime-keymap into your User keymap):

[
    {
        "keys": ["primary+alt+r"],
        "command": "markdown_preview_overlay_toggle",
        "context": [{ "key": "setting.is_widget", "operand": false }]
    }
]

primary+alt+r automatically maps to Cmd+Option+R on macOS and Ctrl+Alt+R on Windows/Linux in Sublime Text.

Development installation

Clone or link this directory as Packages/MarkdownPreviewOverlay, then run Package Control: Satisfy Dependencies. Package Control installs mdpopups according to dependencies.json.

Sublime Text build 4050 or newer is required. The package selects Sublime's Python 3.8 plugin host through .python-version.

License

This project is licensed under the Apache-2.0 License.

Results

Packages