Markdown Auto Preview Bridge
English | 简体中文
English
Open Markdown. Start reading.
Automatically preview Markdown files with Markdown Preview Enhanced (MPE). Read project documentation or open document links from Codex chats without switching to preview manually.
Get started
- Install and enable Markdown Preview Enhanced.
- Install Markdown Auto Preview Bridge by eriseven from the VS Code Marketplace, and reload if prompted.
- Open a trusted local project folder, then open a Markdown file.
By default, all .md and .markdown files in the project are eligible, except those in node_modules and .git. No extra configuration is needed.
Requires Windows desktop VS Code 1.82 or later. Commands and messages follow your VS Code display language: English, Simplified Chinese or Traditional Chinese. Other languages use English.
You can also install a downloaded .vsix through Extensions → … → Install from VSIX. If you used the earlier local test version (local-md-preview-bridge), disable or uninstall it before enabling this version to avoid running two copies.
Read links from chat
Links with line positions and repeated opens are supported by default. The link must open a local file in the current VS Code window. The preview may not scroll to the linked line.
The same behavior applies to Explorer and other entry points. To customize it, search for mdPreviewBridge in Settings.
Edit a document
Run Markdown: Edit Source and Keep Editing for This Session from the Command Palette (Ctrl+Shift+P), or click the pencil button on the Markdown tab.
The file stays in editing mode, even after closing and reopening it. To read it again, run Markdown: Preview Now with MPE.
Your document contents are never changed, automatically saved or discarded by this extension.
Common actions
| Action |
Command |
| Preview the current file |
Markdown: Preview Now with MPE |
| Pause automatic previews |
Markdown: Pause Auto Preview in This Window |
| Resume automatic previews |
Markdown: Resume Auto Preview in This Window |
| Find out why preview was skipped |
Markdown: Show Auto Preview Diagnostics |
Preview not opening?
- Check that MPE is enabled, the workspace is trusted, and the file is within your configured scope.
- Source tabs already open at startup, files being edited or containing unsaved changes, and comparison views stay in source view.
- Try Markdown: Preview Now with MPE. Handle any unsaved changes yourself first.
- If needed, run Markdown: Show Auto Preview Diagnostics and share the diagnostic output when reporting the issue.
To stop using the extension, disable or uninstall it from the Extensions view.
简体中文
打开 Markdown,直接阅读预览。
配合 Markdown Preview Enhanced(MPE),自动将打开的 Markdown 文件切换为预览。适合阅读项目文档,以及从 Codex 聊天中点击文档链接。
开始使用
- 安装并启用 Markdown Preview Enhanced。
- 从 VS Code 插件市场安装 eriseven 发布的 Markdown Auto Preview Bridge,按提示重载窗口。
- 打开一个受信任的本地项目文件夹,再打开 Markdown 文件。
默认自动预览项目中的 .md 和 .markdown 文件,跳过 node_modules 和 .git 文件夹。安装后即可使用,无需额外配置。
适用于 Windows 本地桌面版 VS Code 1.82 及以上版本。命令与提示跟随 VS Code 显示语言,支持英文、简体中文和繁体中文;其他语言默认英文。
也可通过 扩展 → … → 从 VSIX 安装 安装下载的 .vsix 文件。若用过早期本地测试版(local-md-preview-bridge),请先禁用或卸载旧版,避免两个版本同时运行。
阅读聊天中的文档链接
默认支持:
- 自动预览项目中的 Markdown 文档。
- 允许带行号或选区的聊天链接打开预览。
- 允许再次点击已预览过的文档链接。
资源管理器和聊天链接等入口都适用。链接需要在当前 VS Code 窗口中打开本地文件;预览页不保证滚动到链接指定行。
需要调整预览范围或行为时,在 VS Code 设置中搜索 mdPreviewBridge。
想编辑文档?
按 Ctrl+Shift+P,运行 Markdown:编辑源码并在本会话豁免,或点击 Markdown 标签右上角的铅笔按钮。
该文件会保持编辑状态,关闭后重新打开也不会自动切回预览。想继续阅读时,运行 Markdown:立即用 MPE 预览。
插件不会修改正文,也不会自动保存或丢弃你的修改。
常用操作
在命令面板中搜索以下命令:
| 想做什么 |
命令 |
| 预览当前文档 |
Markdown:立即用 MPE 预览 |
| 暂时关闭自动预览 |
Markdown:暂停本窗口自动预览 |
| 重新开启自动预览 |
Markdown:恢复本窗口自动预览 |
| 查看未预览的原因 |
Markdown:显示自动预览诊断 |
没有自动预览?
- 确认 MPE 已启用,项目已受信任,文件位于设置的预览范围内。
- 启动时已经打开的文档、正在编辑或含未保存修改的文档、文件对比页面,会保持源码显示。
- 当前文档可尝试 Markdown:立即用 MPE 预览;有未保存修改时,请先自行处理。
- 仍有问题时,运行 Markdown:显示自动预览诊断,提供诊断结果以便排查。
不再需要时,在扩展面板禁用或卸载本插件即可。