Vscode-markdown: Ctrl + B does not work i.e. does not apply bold formatting

Created on 18 Mar 2021  ·  6Comments  ·  Source: yzhang-gh/vscode-markdown

Problem


What went wrong? Ctrl + B not applying bold formatting
Expected behavior? Ctrl + B should apply bold formatting as per the key bindings in VS Code
Your environment (if necessary)? Windows : Version 10.0.18363 Build 18363, VSCode : 1.54.3

This is how my key-binding looks like currently : --

image

How to reproduce

Select a word and then hit Ctrl+B. Ideally this should apply bold formatting to the word and the word should be seen as surrounded by double asterisks. But does not work in my case. It used to work previously. I tested other shortcut, for example _Ctrl + I_ and it works fine. I am able to _italicize_ the selections.

Error message in the console


Errors:--

:x: configuration.ts:351 Conflict in default settings: Ignoring vscode-kubernetes.kubectl-path.windows as vscode-kubernetes.kubectl-path is ""
(anonymous) @ configuration.ts:351
:x: configuration.ts:351 Conflict in default settings: Ignoring vscode-kubernetes.helm-path.windows as vscode-kubernetes.helm-path is ""
(anonymous) @ configuration.ts:351
:x: configuration.ts:351 Conflict in default settings: Ignoring vscode-kubernetes.minikube-path.windows as vscode-kubernetes.minikube-path is ""
(anonymous) @ configuration.ts:351
:x: configuration.ts:351 Conflict in default settings: Ignoring vscode-kubernetes.kubectl-path.mac as vscode-kubernetes.kubectl-path is ""
(anonymous) @ configuration.ts:351
:x: configuration.ts:351 Conflict in default settings: Ignoring vscode-kubernetes.helm-path.mac as vscode-kubernetes.helm-path is ""
(anonymous) @ configuration.ts:351
:x: configuration.ts:351 Conflict in default settings: Ignoring vscode-kubernetes.minikube-path.mac as vscode-kubernetes.minikube-path is ""
(anonymous) @ configuration.ts:351
:x: configuration.ts:351 Conflict in default settings: Ignoring vscode-kubernetes.kubectl-path.linux as vscode-kubernetes.kubectl-path is ""
(anonymous) @ configuration.ts:351
:x: configuration.ts:351 Conflict in default settings: Ignoring vscode-kubernetes.helm-path.linux as vscode-kubernetes.helm-path is ""
(anonymous) @ configuration.ts:351
:x: configuration.ts:351 Conflict in default settings: Ignoring vscode-kubernetes.minikube-path.linux as vscode-kubernetes.minikube-path is ""

:x: console.ts:137 [Extension Host] (node:9756) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Do let me know if you need any other info. :smiley:

input Question Answered

Most helpful comment

Then you can edit the when clause by yourself (also in the right-click menu). Just add && editorLangId != 'markdown' there. I guess it is very intuitive from your screenshot above.

There is no one-fits-all setting for all the users (e.g., #89), but VS Code always offers options to customize, which is good.

All 6 comments

Thanks.

You can take a look at https://code.visualstudio.com/docs/getstarted/keybindings#_troubleshooting-keybindings. It will tell us how the keyboard shortcut is dispatched.

Thanks for the guidance @yzhang-gh . I get below log upon Ctrl+B. I could make out some sense of the line
From 3 keybinding entries, matched editor.action.goToDeclaration, when: editorTextFocus, source: user extension k--kato.intellij-idea-keybindings.
and confirmed that Ctrl+B has infact 3 bindings as can be seen in the below screenshot :

image

However I am not sure how to get around this. As per the log it appears that the second key-binding in the list gets executed. How do I make the Ctrl+B of markdown work. Will that have any adverse effect ? I'm just not sure and confused too.

C#

You can right-click the editor.action.goToDeclaration and delete it (if you don't need this keybinding). I don't think there will be any side effect except that you can no longer "go to declaration" with ctrl+b 😄

Isn't there something context specific? I mean there is no need for goToDeclaration in case of markdowns. So doesn't this sound natural for an editor to respect Ctrl+B bindings for markdown files. Why do I have to go about deleting the existing key-bindings. I expect them to execute appropriate command based on the when clause. Is this some kind of bug at VSCode's side?

Then you can edit the when clause by yourself (also in the right-click menu). Just add && editorLangId != 'markdown' there. I guess it is very intuitive from your screenshot above.

There is no one-fits-all setting for all the users (e.g., #89), but VS Code always offers options to customize, which is good.

Thank you @yzhang-gh That worked. Solves my issue.

image

Thanks for teaching me this really handy technique. You are awesome. 👍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rdhar picture rdhar  ·  4Comments

FrancesCoronel picture FrancesCoronel  ·  4Comments

chuyangliu picture chuyangliu  ·  5Comments

gurbindersingh picture gurbindersingh  ·  4Comments

jerry-sky picture jerry-sky  ·  4Comments