By default, VS Code opens .md files in the text editor. To open them in preview mode instead:
- Open Settings (JSON):
Ctrl+Shift+P→Preferences: Open User Settings (JSON) - Add this to your
settings.json:
"workbench.editorAssociations": {
"*.md": "vscode.markdown.preview.editor"
}- Save. All
.mdfiles now open as rendered preview.
- Works in VS Code and forks (Cursor, Antigravity, etc.)
- To edit a file, right-click → Open With... → select the text editor
- Settings file locations:
- VS Code:
%APPDATA%/Code/User/settings.json - Cursor:
%APPDATA%/Cursor/User/settings.json - Antigravity:
%APPDATA%/Antigravity/User/settings.json
- VS Code:
Thank you. This is very useful.