SilentVoid13/Templater

Update to 2.8.0 removed all Template hotkeys

tyleralbee opened this issue · 1 comments

Plugin information:

  • OS: Ubuntu 22.04.5 LTS
  • Templater version: 2.8.0
  • Obsidian version: 1.6.7
  • Templater settings:
{
  "command_timeout": 5,
  "templates_folder": "templates",
  "templates_pairs": [
    [
      "",
      ""
    ]
  ],
  "trigger_on_file_creation": true,
  "auto_jump_to_cursor": true,
  "enable_system_commands": false,
  "shell_path": "",
  "user_scripts_folder": "",
  "enable_folder_templates": true,
  "folder_templates": [
    {
      "folder": "orgs/redacted",
      "template": "templates/redacted.md"
    },
    {
      "folder": "orgs/example/redacted-2",
      "template": "templates/daily-example-redacted-2.md"
    }
  ],
  "enable_file_templates": false,
  "file_templates": [
    {
      "regex": ".*",
      "template": ""
    }
  ],
  "syntax_highlighting": true,
  "syntax_highlighting_mobile": false,
  "enabled_templates_hotkeys": [
    "templates/datetime.md",
    "templates/history.md",
    "templates/info.md",
    "templates/invoice/lines/code.md",
    "templates/invoice/lines/meeting.md",
    "templates/time.md",
    "templates/task.md"
  ],
  "startup_templates": [
    ""
  ]
}

Describe the bug

After updating Templater to 2.8.0, all of my custom Template hotkeys were wiped. To be clear, the plugin's standard hotkeys were not removed; only hotkeys that were connected to my custom templates. This includes all of the hotkeys that were connected to templates defined in "enabled_templates_hotkeys". In my case, this consisted of:

  • Templater: Insert templates/datetime.md
  • Templater: Insert templates/history.md
  • Templater: Insert templates/info.md
  • Templater: Insert templates/invoice/lines/code.md
  • Templater: Insert templates/invoice/lines/meeting.md
  • Templater: Insert templates/time.md
  • Templater: Insert templates/task.md

Hotkeys that were not removed:

  • Templater: Create new note from template
  • Templater: Jump to next cursor location
  • Templater: Open insert template modal
  • Templater: Replace templates in the active file

I would imagine that the following hotkeys would have been removed (but I did not have them set):

  • Templater: Create templates/datetime.md
  • Templater: Create templates/history.md
  • Templater: Create templates/info.md
  • Templater: Create templates/invoice/lines/code.md
  • Templater: Create templates/invoice/lines/meeting.md
  • Templater: Create templates/time.md
  • Templater: Create templates/task.md

Expected behavior

Templater updates should not clear out Template hotkeys.

Screenshots

image

Additional context

  • All hotkeys that were lost were of the format ctrl+alt +X (e.g. my Templater: Insert templates/info.md hotkey was ctrl+alt +I).
  • In the same batch of plugin updates, my Tasks plugin was updated (to 7.11.0) as well.

Thanks for the report! This was likely broken by #1475. I've pushed a fix in 2.8.1. If you haven't fixed your hotkeys already, this should fix them for you.