• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

vs code

VS Code: Open MD files in Preview Mode

August 14, 2026 by Webhead

Problem:

When viewing Markdown files in Visual Studio Code it opens in the edit mode and you see markdown instead of the formatted version. To see the formatted version you have to right click on the tab and Open Preview mode. It’s often quicker to just read the file.

Solution:

Can’t believe I’ve gone so long without this. Open the Command Pallet (Crl+Shift+P / Cmd+Shift+P) and select Preferences: Open User Settings (JSON)

Add the following entry:

"workbench.editorAssociations": {
  "*.md": "vscode.markdown.editor"
},
"markdown.preview.doubleClickToSwitchToEditor": true

When you need to edit the Markdown source, you can flip the toggle between the lock icon and the pencil icon.

Side note, if you’re in “Markdown Preview” (not Markdown Editor), you can switch from Preview to editing using these methods:

  • Double-clicking anywhere on the rendered preview page
  • Ctrl+Shift+V / Cmd+Shift+V
  • At the top right, there’s a toolbar you can use to switch between editor and preview mode.

Filed Under: Off the Shelf, Tools Tagged With: markdown, vs code

Primary Sidebar

Topics

apache apple chrome cms css debug eCommerce embed filters firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery linux localization macOS mac os x markdown ms sql mysql open source optimize php seo svg tinymce vs code woocommerce wordpress wpengine xss yii youtube

Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools
  • Uncategorized