Options for hotkeys to toggle <!- - - ->" as comment instead of %% %%

Use case or problem

Other markdowns usually do not recognize %% %% as comment. The good old <!-- --> is usually more compatible. The hotkey cmd + / to toggle comment only supports %% %% which itself is easier to type than <!-- -->.

Proposed solution

Add options for hotkeys to toggle <!-- --> as comment, either instead of, or in addition to, %% %%.

10 Likes

Continuing the discussion from Feature Request: Comment Formatting:

I am grateful for the “Toggle comment” shortcut and would however like to change the format of my comments (personally prefer HTML <!-- --> over %%%% for consistency with other software I use). I understand (thanks @ryanjamurphy) that this is not currently possible, so I’m making a feature request. Thanks for considering this!

4 Likes

Just want to mention that I made the same request here but so far no interest.

2 Likes

Thanks, merged

Let’s please implement this as an option at least. Of all the markdown programs I use (Obsidian, RStudio, Zettlr, Panda/Bear, Typora, VS Code…), Obsidian is the only one I’ve seen use %% as comment syntax.

One year later, however, the toggle comment with <!-- --> hasn’t been implements! I have to add the comment manually to make it consistency with other software, i.e. Typora, GitHub.

Please add an option to set <!-- --> as the auto-inserted comment.

If it’s been a year, why not just do it with Templater? It’s a one-line template:

<!--<% tp.file.selection() %>-->

Assign that to a hotkey, and you can comment out any selected text instantly.

Comment syntax and usage varies substantially between plaintext programs. Markdown programs will usually interpret the HTML, but it’s a pain to write and distracting when reading. Ulysses does use %% as part of its commenting system.

There are two plugins would allow you to do this now:

  1. Smart Markdown Hotkeys
  2. Multiline formatting

Just set the hotkeys and you are good to go.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.