Noteline
DownloadPricingBlogOpen Web App

← All posts

October 1, 2026·6 min read

Markdown in VS Code: preview, Mermaid, and Word or PDF export

How to write Markdown in VS Code in 2026: preview shortcuts, built-in Mermaid, the new in-place editor, and the routes to Word and PDF export.

Markdown in VS Code works well out of the box: the editor previews Markdown side by side with your source, renders Mermaid diagrams and math in that preview, and has strong tools for links and Git. What it doesn't do on its own is export. For PDF you add an extension, and for Word you install Pandoc. This guide covers the preview, the new in-place editor, the export routes, and when a separate writing app on the same folder is worth it.

Facts are as of September 2026 (VS Code 1.138).

How do you preview Markdown in VS Code?

VS Code "supports Markdown files out of the box," according to its Markdown documentation. The built-in set is broad:

  • Preview. Toggle the preview with ⇧⌘V (Ctrl+Shift+V on Windows and Linux), or open it beside the source with ⌘K V (Ctrl+K V). The two panes scroll together, and double-clicking an element in the preview jumps to that line in the source.
  • Mermaid, built in. Since version 1.121 (May 20, 2026), the preview renders mermaid code blocks as diagrams, with panning and zooming. This used to require an extension.
  • Math. The preview renders equations with KaTeX.
  • Front matter. Since 1.121, YAML front matter shows as a table at the top of the preview.
  • Link tools. Path and header completions, workspace-wide header search (⌘T or Ctrl+T), Find All References, and renaming a header updates every link that points to it. Link validation exists but is off by default.
  • Images. Drag or paste an image into a Markdown file and VS Code copies it into your workspace and writes the link.
  • Git. Version control is built in, and the preview can render diffs of Markdown as formatted text (an opt-in setting).

By default you type in the source pane and read the result in a second pane. For documentation that sits next to code, that is often exactly right.

Can you edit Markdown in place in VS Code?

Partly, and it's new. Release 1.131 (July 29, 2026) introduced an experimental hybrid Markdown editor for the Agents window that lets you "view Markdown files, edit them in-place, and add comments that an agent can act on." You can also switch to it in a normal editor window with Reopen Editor With.

It is still experimental. As of September 23, 2026 there are open bug reports on the VS Code issue tracker, including one on CJK input. It is worth trying on a copy of a file; the stable default is still source plus preview.

How do you export Markdown to PDF or Word from VS Code?

There is no export command in the product, and the Markdown documentation lists none. A 2025 feature request to add export alongside the preview was closed as an extension candidate with the standard reply: "We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension." So you pick a route:

  1. PDF with an extension. Markdown PDF converts Markdown to PDF, HTML, PNG, or JPEG. It prints through Chromium and downloads a managed copy on first use if Chrome or Edge isn't installed. It has millions of installs and is actively maintained.
  2. HTML, then PDF. Markdown All in One can print the current document to HTML, and its README suggests printing that HTML to PDF from a browser.
  3. Word with Pandoc. Install Pandoc yourself, then run it from the integrated terminal:
pandoc notes.md -o notes.docx

None of these routes is hard, especially for developers. Each is a one-time setup, and the output depends on which extension and settings you picked. If you export often, a Pandoc command saved as a VS Code task turns it into one shortcut.

Where is VS Code the right place to write Markdown?

VS Code is the stronger tool in these cases:

  1. Docs that live with code. READMEs, changelogs, and docs/ folders sit next to the code, the terminal, and the build.
  2. Link-heavy projects. Renaming a header and having every link update, finding all references, and validating links matter once you have hundreds of cross-linked files.
  3. Review and history. Built-in Git and rendered Markdown diffs make prose review easy.
  4. Extensibility. Lint with markdownlint, spell check with Code Spell Checker, generate a table of contents. If a Markdown feature is missing, there is usually an extension for it.
  5. Math and images. KaTeX and inline images in the preview matter for technical and academic writing.
  6. Cost and reach. VS Code is free, including for commercial use, runs on all three desktop platforms, and vscode.dev runs in a browser, including on an iPad.

When does a separate Markdown writing app help?

When most of what you write is prose rather than code: notes, drafts, meeting notes, reports, or answers pasted from an AI chat that need to become a document. Two things change.

The text renders where you type. A live-preview editor has no second pane. Headings show without the #, bold shows as bold, tables become an editable grid, and the Markdown marks appear only on the line you're editing.

Export becomes a menu item. For example, Noteline (our app) bundles Pandoc and Typst in its desktop app, so File ▸ Export as Word… and File ▸ Export as PDF… produce a file on your machine with no setup. The web editor and phone apps don't export; that is desktop only. For how offline conversion works, see Markdown to Word and PDF, fully offline.

VS Code A live-preview editor such as Noteline
Price (as of September 2026) Free Noteline desktop: $4.99 once after a 30-day trial; web editor and phone apps free
Writing view Source plus side preview; in-place editor experimental Rendered in place; source view on toggle
Tables Pipe syntax, rendered in the preview Editable grid
Mermaid In the preview (since 1.121) In the editor
Math and images Yes, in the preview Noteline: no math; images show as alt text
Word and PDF Pandoc and extensions Built into Noteline desktop, offline
Git and extensions Built in, large marketplace None

The trade is real in both directions. If you need math, inline images, Git, or link refactoring, stay in VS Code.

Can you use VS Code and another editor on the same folder?

Yes. Markdown files are plain text, so the folder is the integration. There is no Noteline extension for VS Code, and none is needed.

  1. Open the folder in both apps. In Noteline desktop, use File ▸ Open Folder…. It lists the Markdown and text files and skips dot-folders like .git and .vscode.
  2. Use VS Code for the repository. Git, search-and-replace across files, link checks, anything that touches code.
  3. Use the writing app for the writing. Noteline's desktop app watches the folder, so files you change in VS Code show up in its list shortly afterwards.
  4. Edit one note in one place at a time. If a note changed on disk while it was open, Noteline shows "This note was changed on disk." with Use disk version and Keep my version instead of overwriting it.

For which Markdown syntax renders the same everywhere, see the tables, code, and Mermaid guide.

Frequently asked questions

How do I open the Markdown preview in VS Code? Press ⇧⌘V (Ctrl+Shift+V) to toggle it, or ⌘K V (Ctrl+K V) to open it beside the source.

Does VS Code render Mermaid diagrams without an extension? Yes, since version 1.121 (May 2026), in the Markdown preview.

Can VS Code export Markdown to Word or PDF without extensions? No. PDF usually comes from an extension such as Markdown PDF, and Word needs Pandoc installed separately, run from the terminal or through an extension.

Does VS Code have a WYSIWYG Markdown editor? Partly. The hybrid editor added in 1.131 edits in place but is still experimental as of September 2026.

If most of your Markdown is writing rather than code, try a live-preview editor on the same folder for a week and see which window you keep reaching for.

Your notes should be files you own.

Noteline keeps every note as a plain .md file in your folder — the same Markdown that AI reads and writes, with Word & PDF export offline. Free for 30 days, then $4.99 once.

Download NotelineOr try the web editor →

Keep reading

  • How to sync Markdown notes without a server
  • AI agents that read and write your files
  • Noteline is now on iPhone, iPad, and Android

Noteline — a fast, minimal Markdown editor. Download · Pricing

© 2026 Noteline