Templater Bug Report: First Character Removed from Snippet Template Command Names
Bug Description
When creating hotkey-enabled template snippets, Templater removes the first character from the template filename when displaying the command name in the command palette.
Steps to Reproduce
- Create a template file:
06 Toolkit/Snippets/Quote Snippet Template.md
- Enable it as a hotkey template in Templater settings
- Open command palette (Ctrl/Cmd + P)
- Search for "Templater: Insert"
- Observe: Command shows as "Templater: Insert uote Snippet Template" (Q is missing)
Expected Behavior
Command should display as: Templater: Insert Quote Snippet Template
Actual Behavior
Command displays as: Templater: Insert uote Snippet Template
Root Cause (Investigation)
The bug appears to be in the command name generation logic where Templater calls .slice(1) on the template basename:
// Current (buggy) behavior
const basename = path.split('/').pop().replace('.md', '');
commandName = 'Templater: Insert ' + basename.slice(1); // BUG: removes first char
Should be:
commandName = 'Templater: Insert ' + basename; // No slice needed
Affected Files
All snippet templates show this behavior:
- "Quote Snippet Template.md" → "uote Snippet Template"
- "Callout Snippet.md" → "allout Snippet"
- "Heading 1 Snippet Template.md" → "eading 1 Snippet Template"
Environment
- Templater version: 2.16.4
- Obsidian version: (latest)
- Platform: Windows/Mac/Linux
Workaround
Prefix template filenames with an underscore:
_Quote Snippet Template.md displays correctly as "Quote Snippet Template"
Impact
- Confusing command palette entries
- Makes it harder to find the right snippet
- Workaround requires renaming all snippet files
Suggested Fix
Remove the .slice(1) call from the basename when generating command names for template snippets.
Related Code Location: Likely in the function that registers template hotkey commands in main.js (minified in production build)

Templater Bug Report: First Character Removed from Snippet Template Command Names
Bug Description
When creating hotkey-enabled template snippets, Templater removes the first character from the template filename when displaying the command name in the command palette.
Steps to Reproduce
06 Toolkit/Snippets/Quote Snippet Template.mdExpected Behavior
Command should display as:
Templater: Insert Quote Snippet TemplateActual Behavior
Command displays as:
Templater: Insert uote Snippet TemplateRoot Cause (Investigation)
The bug appears to be in the command name generation logic where Templater calls
.slice(1)on the template basename:Should be:
Affected Files
All snippet templates show this behavior:
Environment
Workaround
Prefix template filenames with an underscore:
_Quote Snippet Template.mddisplays correctly as "Quote Snippet Template"Impact
Suggested Fix
Remove the
.slice(1)call from the basename when generating command names for template snippets.Related Code Location: Likely in the function that registers template hotkey commands in
main.js(minified in production build)