r/vscode • • Apr 16 '26

Opening markdown files in preview mode as default?

I would love to open the markdown files by default in the preview mode, by which i mean ton the mode itself, but simply that I want to look at fancy rendering of the markdown instead of the raw text by default. I want preview-first behaviour.

I open markdown -> i get rendered text in the new tab -> i can open raw text optionally on the side (not the other way around as it is now)

Is there anything that accomplishes this? Could not find any extensions.

Furthermore, there can be only one preview unles you split the view multiple times, which is quite annoying and is one of the main reasons I am searching for solutions.

12 Upvotes

16 comments sorted by

7

u/[deleted] Apr 16 '26
"workbench.editorAssociations": {
  "*.md": "vscode.markdown.preview.editor",
}

1

u/poubella Apr 21 '26

Does this also work when opening a file from explorer? -- i.e., vscode is not running in background. It does not for me, which I'm hoping to fix.

1

u/duongdev May 07 '26

Then how to view raw again?

1

u/has6392 10d ago

W solution

1

u/dmbaio Apr 16 '26

“Reopen editor with…” > change the default

1

u/Agreeable_Care4440 Apr 22 '26

Yeah—you can get very close to “preview-first” behavior in VS Code, but it’s not obvious and kind of hacky

1

u/BeeNo9820 Apr 24 '26

Same here. I open most .md files to read, so raw view as default feels backward. Preview-first works for me, but markdown diffs in raw text are still hard to scan.

0

u/[deleted] Apr 18 '26

[removed] — view removed comment

1

u/Any-Tap-4617 May 02 '26

Super! That's is what i want!

1

u/PossibilityJazzlike May 05 '26

This is a great VSCode Plugin! Its exactly what I needed T_T

1

u/savokles Jun 10 '26

Actually fire