Search code examples
visual-studio-code

Prevent ctrl-B from setting bold font while working with md files with the Markdown All in One extension


In VS Code, when you are working with a markdown file with the "Markdown All in One" extension active, ctrl-B sets the selected text to bold by surrounding it with **

The problem is that I use the ctrl-B keyboard shortcut all the time to show/hide the side bar.

Is there any way to disable that emboldening shortcut (or define an alternative one) when working with Markdown files, and to use it for hiding the side bar?

edit: the problem was that I had the 'Markdown All in One' installed


Solution

  • There's an existing issue ticket tracking this: Ctrl+B takes over "hide sidebar" shortcut #89. I suggest that you give that issue ticket a thumbs up to show support for it. You can also subscribe to it to get notified about discussion and progress. Please avoid making noisy comments there like ones that just consist of "+1" / "bump".

    If you want to unmap those keybindings, you can put the following in keybindings.json:

    {
        "key": "cmd+b", // for macOS
        "command": "-markdown.extension.editing.toggleBold",
    },
    {
        "key": "ctrl+b", // for Windows / Linux
        "command": "-markdown.extension.editing.toggleBold",
    },