I want to make a keybinding in vscode, but want it to only work in markdown. I think I should use when clause, but not sure how to set the parameter for this clause.
Yes, you need to use the editorLangId parameter in the when condition key.
You should do something like this:
{
"key": "key1+key2+key3",
"command": "some.editor.action",
"when": "editorLangId == 'markdown' && withThisCondition || otherwiseSomethingElse"
}
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With