vscode-markdown icon indicating copy to clipboard operation
vscode-markdown copied to clipboard

Allow Markdown All in One to be activated inmediately when a user opens a folder that does not contain `.md` files but do have files of md variants

Open CLRafaelR opened this issue 1 year ago • 2 comments

Proposal

Currently, Markdown All in One will not be activated when a user opens a folder that does not contain .md files. As shown in a figure below, we can tell that from observing the "Runtime Status" tab in the extention tab that appears in such a folder.

image

However, it is very convenient that Markdown All in One is activated even when a user opens a folder that has no .md files but files of md variants (i.e. R Markdown files with .Rmd or .rmd extentions). Or, is it possible to manually activate Markdown All in One in a folder in which there is no .md files?

Other information

Markdown All in One is usable and useful when a user edits files of md variants, as well as pure .md files. For example, I overwrite key binding settings so that I can use Markdown All in One's functionalities (e.g. Ctrl/Cmd + b to make letters bold, and Ctrl/Cmd + i to italicise letters):

[
  {
    "key": "ctrl+i",
    "command": "markdown.extension.editing.toggleItalic",
    "when": "editorTextFocus && !editorReadonly && editorLangId == 'markdown' || editorTextFocus && !editorReadonly && editorLangId == 'rmd'"
  },
  {
    "key": "ctrl+b",
    "command": "markdown.extension.editing.toggleBold",
    "when": "editorTextFocus && !editorReadonly && editorLangId == 'markdown' || editorTextFocus && !editorReadonly && editorLangId == 'rmd'"
  },
  {
    "key": "ctrl+m",
    "command": "markdown.extension.editing.toggleMath",
    "when": "editorTextFocus && !editorReadonly && editorLangId == 'markdown' || editorTextFocus && !editorReadonly && editorLangId == 'rmd'"
  },
  {
    "key": "",
    "command": "markdown.extension.editing.toggleList",
    "when": "editorTextFocus && !editorReadonly && editorLangId == 'markdown' || editorTextFocus && !editorReadonly && editorLangId == 'rmd'"
  },
  {
  "key": "alt+enter",
  "command": "r.runSelectionRetainCursor",
  "when": "editorTextFocus && editorLangId == 'rmd'"
},
{
  "key": "ctrl+shift+alt+enter",
  "command": "r.runAllChunks",
  "when": "editorTextFocus && editorLangId == 'rmd'"
}
]

CLRafaelR avatar Oct 10 '22 11:10 CLRafaelR

Thanks for your feedback.

I planned to add such an option in the next release https://github.com/yzhang-gh/vscode-markdown/issues/618#issuecomment-1135311605, although didn't get the time to do it, probably this weekend.

yzhang-gh avatar Oct 10 '22 11:10 yzhang-gh

@yzhang-gh

Thank you for responding me, and sorry that I have missed the previous issue... However, I am so delighted to know that you are planning support markdown variants!

CLRafaelR avatar Oct 11 '22 01:10 CLRafaelR

Let's merge this into #618

yzhang-gh avatar Oct 23 '22 11:10 yzhang-gh

@yzhang-gh Thank you for your arrangement and resolving the issue. I checked out #618 .

CLRafaelR avatar Oct 24 '22 04:10 CLRafaelR