Answer a question

99.999999999% of my work with markdown files is reading. Can I enable preview mode by default for this files?

Answers

I tried this in VS Code 1.48.1

Method 1

Open a markdown (*.md) file, then open the Command Palette and select >View: Reopen Editor With... > Markdown Preview (Experimental).

Method 2

Add these lines to your settings.json file

{
    // your other settings ...
    "workbench.editorAssociations": [
        {
            "viewType": "vscode.markdown.preview.editor",
            "filenamePattern": "*.md"
        }
    ],
}

Method 3

I am using VS Code 1.61.2 this worked, as I also had some other mappings in the settings.json

{
    // your other settings ...
    "workbench.editorAssociations": [
        {
            "*.md": "vscode.markdown.preview.editor"
        }
    ],
}

Method 4

VSCode team change this configuration, I'm using v1.63.2

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

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐