Closed kongdd closed 2 years ago
Can vscode-markdown
export the function styleByWrapping
as an command?
In this way, users can define other shortcuts by themselves.
solved by markdown.extension.editing._wrapBy
.
{
"key": "ctrl+b",
"command": "markdown.extension.editing._wrapBy",
"when": "editorLangId == 'rmd' || editorLangId == 'qmd' || editorLangId == 'markdown'",
"args": {
"before": "**",
"after": "**"
}
},
{
"key": "ctrl+i",
"command": "markdown.extension.editing._wrapBy",
"when": "editorLangId == 'rmd' || editorLangId == 'qmd' || editorLangId == 'markdown'",
"args": {
"before": "*",
"after": "*"
}
},
{
"key": "ctrl+u",
"command": "markdown.extension.editing._wrapBy",
"when": "editorLangId == 'rmd' || editorLangId == 'qmd' || editorLangId == 'markdown'",
"args": {
"before": "<u>",
"after": "</u>"
}
},
Thanks
Do you have idea how to apply shortcuts to Rmarkdown files? Thank you very much! https://rmarkdown.rstudio.com/