VS Code Markdown Bold Shortcut Not Working

Viewed 7

Usually, cmd + b or ctrl + b (in Windows) will make the selected text bold in a Markdown file but that's not working. How can I fix it?

1 Answers

By default, cmd + b is the keyboard shortcut for toggling sidebar visibility. To change it, add the following block of code in the keybindings.json file:

    {
        "key": "cmd+b",
        "scope": "markdown",
        "command":"editor.action.insertSnippet",
        "when":"editorTextFocus && editorLangId == 'markdown'",
        "args":{
            "snippet":"**$TM_SELECTED_TEXT**$0"
        }
    }
Related