obsidian-hotkeys-for-templates icon indicating copy to clipboard operation
obsidian-hotkeys-for-templates copied to clipboard

Bug when using hotkeys for templates that work on selected words.

Open eomiso opened this issue 3 years ago • 12 comments

Hi I've been trying set up hotkeys for a simple template file like such:

<mark class="blue"><% tp.file.selection() %></mark>

The template works as expected when I use the Templater plugin. However when I use the hotkeys , the selected words doesn't seem to be passed on to the template script like the result below

image

Is this a known bug?

eomiso avatar Jan 11 '22 12:01 eomiso

Is your command called Insert from Templater: <template-file>

Vinzent03 avatar Jan 11 '22 13:01 Vinzent03

No they are Simply Insert: <template_file_name>. I figure that might be the problem, but the command Insert from Templater wouldn't show in the Settings > Hotkeys.

I do have my Templater plugin enabled at the moment

eomiso avatar Jan 11 '22 13:01 eomiso

Can you share a screenshot of the settings pane of this plugin?

Vinzent03 avatar Jan 11 '22 13:01 Vinzent03

Yes, This is the settings pane of Hotkeys for templates : image

image

And this is the settings pane for Templater: image

image

And finally for the core plugin Templates: image

eomiso avatar Jan 11 '22 13:01 eomiso

Hmm strange, it doesn't show the templater templates. Could you open the console (CTRL + SHIFT +I) and show me the output of

  1. app.plugins.plugins["templater-obsidian"]._loaded
  2. app.plugins.plugins["obsidian-hotkeys-for-templates"].activePlugins

Vinzent03 avatar Jan 11 '22 17:01 Vinzent03

  1. Unfortunately, it is showing true. image

  2. This is very strange, there are no active Plugins... image

eomiso avatar Jan 11 '22 17:01 eomiso

Hmm, are you on the latest version (1.4.3)?

Vinzent03 avatar Jan 11 '22 17:01 Vinzent03

Yes, it is😢

eomiso avatar Jan 11 '22 17:01 eomiso

I was using templater 1.8.3 till just now and just updated to 1.9.9 and it's still not working unfortunately.

eomiso avatar Jan 11 '22 17:01 eomiso

Did you restart Obsidian after update?

Vinzent03 avatar Jan 11 '22 17:01 Vinzent03

Yes I did, still not showing the For templater option.

eomiso avatar Jan 11 '22 17:01 eomiso

After upgrading the Templaters plugin I realized that they've added hotkeys to its feature. So I've resorted into using that one instead. But it's a bummer that this plugin is not working. I would prefer the UX of this plugin than the Templater's

eomiso avatar Jan 11 '22 18:01 eomiso