Skip to content

Instantly share code, notes, and snippets.

@gambitier
Created October 19, 2025 01:35
Show Gist options
  • Select an option

  • Save gambitier/80c18170e6f7f51a8c75e2c6c089d44d to your computer and use it in GitHub Desktop.

Select an option

Save gambitier/80c18170e6f7f51a8c75e2c6c089d44d to your computer and use it in GitHub Desktop.
Configure VS Code workspace to open .md files in preview mode by default. Includes editor associations and markdown preview settings.

VS Code: Set Markdown Preview as Default

Content:

{
  "workbench.editorAssociations": {
    "*.md": "vscode.markdown.preview.editor"
  },
  "markdown.preview.openMarkdownLinks": "inPreview",
  "markdown.preview.scrollPreviewWithEditor": true,
  "markdown.preview.scrollEditorWithPreview": true
}

How to apply:

  1. Open VS Code Settings (Cmd+, / Ctrl+,)
  2. Click "Open Settings (JSON)"
  3. Add the above configuration
  4. Reload VS Code

Result: All .md files will open in preview mode by default.

@gauravgrover-keystone
Copy link
Copy Markdown

Thanks. This worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment