Auto Filename is an Obsidian.md plugin that automatically renames files in Obsidian based on the first x characters of the file, saving you time and effort.
I'm requesting an enhancement to your plugin to correctly handle 'Templater' syntax. Specifically, the plugin should:
Ignore 'Templater' commands when determining the first line content, especially <% tp.file.cursor(1) %>.
Wait for 'Templater' to finish executing before applying the auto-filename logic.
Correctly handle the frontmatter created by 'Templater'.
Here's my 'Templater' template for all new notes:
---created: <% tp.date.now("YYYY.MM.DD HH:mm") %>modified: <% tp.date.now("YYYY.MM.DD HH:mm") %>tags:---<% tp.file.cursor(1) %><%*tp.hooks.on_all_templates_executed(async () => {app.workspace.activeLeaf.view.editor.focus();});-%>
Currently, 'Auto Filename' renames all new notes to <% tp.file.cursor(1) %> upon creation. Granted, it 'corrects' itself in a moment by replacing <% tp.file.cursor(1) %> with "Untitled (#)". Still, ideally, it should not put any 'Templater' syntax to title, even if for a moment. This enhancement would ensure seamless integration between your plugin and 'Templater', improving the overall user experience.
I'm requesting an enhancement to your plugin to correctly handle 'Templater' syntax. Specifically, the plugin should:
<% tp.file.cursor(1) %>
.Here's my 'Templater' template for all new notes:
---
created: <% tp.date.now("YYYY.MM.DD HH:mm") %>
modified: <% tp.date.now("YYYY.MM.DD HH:mm") %>
tags:
---
<% tp.file.cursor(1) %>
<%*
tp.hooks.on_all_templates_executed(async () => {
app.workspace.activeLeaf.view.editor.focus();
});
-%>
Currently, 'Auto Filename' renames all new notes to
<% tp.file.cursor(1) %>
upon creation. Granted, it 'corrects' itself in a moment by replacing<% tp.file.cursor(1) %>
with "Untitled (#)". Still, ideally, it should not put any 'Templater' syntax to title, even if for a moment. This enhancement would ensure seamless integration between your plugin and 'Templater', improving the overall user experience.Thank you for considering this request.