Marp for VS Code: slide deck authoring in Markdown without leaving the editor
Marp for VS Code: Create slide deck written in Marp Markdown on VS Code
At a glance
- What is it?
- Marp for VS Code is an extension that converts Markdown files into presentation slides inside VS Code's own preview pane. It adds IntelliSense, diagnostics and export to the standard Markdown editing experience, but restricts export and custom themes in untrusted workspaces.
- Who is it for?
- Marp for VS Code suits engineers who already write documentation in VS Code and want slide decks to live in the same repository as the rest of their files. Install from the Marketplace and verify the preview renders correctly with your current VS Code version, since the minimum is 1.101.0.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 73 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Slide deck authoring inside the editor, activated by a single front-matter flag
Marp for VS Code is a VS Code extension that brings slide deck authoring into the same editor used for code and documentation. A Markdown file becomes a slide deck as soon as `marp: true` appears in its front-matter, and the built-in preview switches from a document layout to a slide-per-page view. It activates automatically whenever a Markdown file is opened, via the `onLanguage:markdown` activation event, so no manual preparation is required.
Engineers who write documentation in VS Code already and want presentations to live in the same repository as their other Markdown files are the intended users. A presentation as a text file can be diff-reviewed, version-controlled and edited in pull requests using the same workflow as any other file in the project. Version 3.6.1 is the current release, published on 2026-08-11, under an MIT licence.
The preview shows one slide per page and tracks the cursor in the editor
With Marp features enabled, the preview pane uses the same interface as VS Code's built-in Markdown preview, but renders the content as Marp slides. An active slide is highlighted in the preview based on the current cursor position in the editor file. This keeps the preview in sync with where editing is happening without any scrolling.
Controlling that highlight is done through the `markdown.preview.markEditorSelection` setting. Setting it to `false` disables the active-slide highlight while the preview remains functional. That setting is part of VS Code's built-in Markdown preview configuration, so changing it affects both regular Markdown preview and the Marp preview together.
The README points new VS Code users to the VS Code Markdown documentation before the Marp documentation, which is the correct sequence for someone who is new to writing Markdown in the editor. Familiarity with VS Code's built-in Markdown editing comes first; Marp adds a layer on top of it.
Installing the extension and writing a first slide
The extension is published on the Visual Studio Marketplace under the identifier `marp-team.marp-vscode`, and also on Open VSX for editors built on the open-source VS Code base. After installing, create or open a Markdown file and add this front-matter block at the top:
---
marp: true
---
# Your slide deck
Start writing!With that block present, the VS Code preview renders the file as a Marp slide deck. A new Marp file can also be created via the 'New File...' menu using Alt+Ctrl+Win+N on Windows or Alt+Cmd+Ctrl+N on macOS, which starts from a template. The toolbar in the editor shows a toggle icon that runs the command `markdown.marp.toggleMarpFeature`, providing a point-and-click way to add or remove `marp: true` without typing it manually. For exporting a finished deck, the command `markdown.marp.export` opens the export dialog.
IntelliSense covers directive auto completion, coloring and hover help
When Marp features are active, the extension extends VS Code's IntelliSense to cover Marp directives. Directives are the Marpit framework's syntax for controlling slide properties globally or per-slide: theme selection, pagination, background images and similar settings. Pressing Ctrl+Space inside the front-matter or inside an HTML comment opens a list of all supported global and local directives. Pressing Ctrl+Space again while a directive is selected displays its help text.
Directive keys receive a distinct color in the editor. For dark themes the default foreground color is #67b8e3ff, and for light themes it is #0288d1ff. These are set through the `marp.directiveKeyForeground` color token and can be overridden in VS Code's color customization settings. The visual differentiation makes it easier to notice when a directive name has been mistyped or placed where it will be ignored, since unrecognized directives are silently skipped by the renderer. Hovering the cursor over a recognized directive key shows its help without triggering the full IntelliSense menu.
Seven diagnostic rules check the front-matter, but only three offer automatic fixes
The extension checks Marp front-matter against 7 named diagnostic rules. 3 of them have Quick Fix support, meaning VS Code can apply an automatic correction when the problem is detected. The `define-math-global-directive` rule recommends declaring the math typesetting library via the `math` global directive and offers to add it. `deprecated-color-setting-shorthand` detects obsoleted shorthands for setting slide colors and can apply the replacement. `deprecated-dollar-prefix` catches directives still using the `$` prefix format that has been removed and can rewrite them.
4 diagnostics report without fixing. `ignored-math-global-directive` fires when the `math` directive is present but math rendering is disabled by the extension's own setting. `overloading-global-directive` flags global directives defined more than once in a file. `unknown-size` reports a size preset that is not defined in the active theme. `unknown-theme` reports an unrecognized theme name.
The split between fixable and unfixable rules reflects what is automatable. Rewriting a deprecated prefix is deterministic. Choosing between size presets requires knowing which themes are installed, which the extension cannot decide on the author's behalf.
Workspace trust restricts export and custom themes in untrusted directories
VS Code's workspace trust system limits what extensions can do in folders that have not been explicitly trusted. Marp for VS Code declares its support level as 'limited' in untrusted workspaces rather than 'unsupported', meaning basic preview and editing continue to work. What is restricted is anything that could allow an untrusted file to affect the local environment.
3 settings are locked in untrusted workspaces: `markdown.marp.html`, `markdown.marp.enableHtml` and `markdown.marp.themes`. The first two control whether HTML tags in slide content are rendered, and the third specifies custom theme files from the workspace directory. Restricting those settings prevents a cloned repository from loading arbitrary HTML or external theme files during preview.
Exporting a slide deck also requires workspace trust. A repository where slides are authored but the workspace is not trusted will show preview correctly and allow editing, but the export command will not be available. For engineers who clone slide repositories written by others, this means verifying workspace trust before the export workflow is accessible.
The extension supports browser-based VS Code, and requires desktop version 1.101.0
The package.json includes both a `main` field (`./lib/extension.js`) for the desktop application and a `browser` field (`./dist/extension.js`). VS Code uses the `browser` field when loading an extension in its web-based environments such as vscode.dev and github.dev. The README does not call this out explicitly, but the package.json structure follows VS Code's convention for browser-compatible extensions, meaning the extension can be used to author and preview slides directly from a browser without installing VS Code locally.
For the desktop version, the minimum requirement is VS Code 1.101.0, specified under the `engines` entry in package.json. Releases below that version will not load the extension.
For generating slides outside the editor, such as in a CI job or as part of a documentation build, the Marp CLI handles batch conversion independently of VS Code. It is a separate tool in the Marp ecosystem and does not need an editor session to run. The VS Code extension links to it as part of the broader Marp ecosystem but is not a replacement for it in automated contexts.
Editorial conclusion
Marp for VS Code suits engineers who already write documentation in VS Code and want slide decks to live in the same repository as the rest of their files. Install from the Marketplace and verify the preview renders correctly with your current VS Code version, since the minimum is 1.101.0. For batch conversion or CI pipelines, marp-cli is the correct tool: this extension is for authoring, not automated builds. In untrusted workspaces, export is blocked and workspace themes are locked out, so check whether your slide repository will be cloned by others before depending on either of those capabilities.
Frequently asked questions
How do I enable Marp in a VS Code Markdown file?
Add `marp: true` to the front-matter at the top of the Markdown file. Once that flag is present, the VS Code preview switches to slide mode for that file. You can also use the toolbar icon or the command `markdown.marp.toggleMarpFeature` to add or remove it.
What VS Code version does Marp for VS Code require?
The package.json specifies VS Code 1.101.0 or newer under its `engines` section, using the value `^1.101.0`. Older versions will not load the extension.
Can I use Marp for VS Code on vscode.dev or github.dev?
The package.json includes a `browser` field pointing to `./dist/extension.js`, which is VS Code's mechanism for declaring browser environment compatibility. The extension can be used in browser-based VS Code without installing the desktop application.
Why is export blocked in my VS Code workspace?
Export requires workspace trust. In an untrusted workspace, the extension runs in limited mode: preview and editing work, but export and custom workspace themes are restricted. Opening VS Code's workspace trust dialog and trusting the folder makes the export command available.
What is the difference between Marp for VS Code and the Marp CLI?
Marp for VS Code is an authoring tool that works inside the editor and provides preview, IntelliSense and export from within VS Code. The Marp CLI is a separate command-line tool for converting Markdown files to slides in batch or automated contexts, without requiring an editor session.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/marp-team-marp-vscode)Was this useful?