Setup VSCode as Markdown Reader
Setup VSCode as Markdown Reader
This guide is based on using Markdown for a knowledge base and wanting VSCode to open files in preview mode by default instead of the editor.
Extensions
The main extension is Markdown Preview Enhanced — it supports full-page preview without split-screen.
Optional useful extensions:
Custom Settings
Open user settings (JSON) and add:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"markdown-preview-enhanced.previewMode": "Previews Only",
"workbench.editorAssociations": {
"*.copilotmd": "vscode.markdown.preview.editor",
"*.md": "markdown-preview-enhanced",
"*.markdown": "markdown-preview-enhanced",
"*.mdown": "markdown-preview-enhanced",
"*.mkdn": "markdown-preview-enhanced",
"*.mkd": "markdown-preview-enhanced",
"*.rmd": "markdown-preview-enhanced",
"*.qmd": "markdown-preview-enhanced",
"*.mdx": "markdown-preview-enhanced"
},
"markdown-preview-enhanced.previewTheme": "github-dark.css",
"markdown-preview-enhanced.automaticallyShowPreviewOfMarkdownBeingEdited": true
}
The key setting is "markdown-preview-enhanced.previewMode": "Previews Only" — this opens Markdown files in full-page preview mode by default.
Create a Custom Shortcut
Create a VSCode profile named “Reader” for the knowledge base. Then create a desktop shortcut with arguments to open it directly:
C:\<Path to VSCode>\Code.exe --profile "Reader" "<Path to Document Folder>"
Optionally, separate the configuration from the default instance:
C:\<Path to VSCode>\Code.exe --profile "Reader" "<Path to Document Folder>" --user-data-dir="<path to custom vscode data>"
Done — you now have a reader shortcut that opens Markdown in preview mode by default.
This post is licensed under CC BY 4.0 by the author.