Template for adding <!-- -- > to a highlighted text

Things I have tried

I manually typed <!-- --> to hide text from being rendered by Pandoc.

What I’m trying to do

I need some help from anyone of you who knows how to make a template to add <!-- --> to a highlighted text automatically by just executing the command/template.


1 Like

hey there, I am still finding a way to do that myself. Till then I’ve found another way to do that:


Put it in between backticks

Note: It will not look good in formatting but can help temporarily : )

Thanks, @shry. Did you type it manually or use a shortcut/hotkey for that? I need to find a shortcut/hotkey so that I don’t have to type it manually.

Sorry for the confusion.
What I mean is not to highlight <!-- --> but to put those codes,<!-- --> to a text that I highlight so that the text will not be rendered by Pandoc.

1 Like

You can use two plugins: Templater + Hotkeys for templates.

  1. With Templater, create a template with this:
<!--<% tp.file.selection() %>-->
  1. With Hotkeys for templates you can define a hotkey to insert the wanted template.

Thanks a lot @mnvwvnm! I do appreciate it

1 Like

oh yeah I got your point. I guess I mistook it. Didn’t knew about this one : )

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