How can I use Templater's cursor expansion in a workflow?

What is the problem?

Let' consider the template below. Normally, when Templater runs, it will replace <% tp.file.title %> with the note title, and remove <% tp.file.cursor() %> and set the editing cursor in its place:

<% tp.file.title %>

<% tp.file.cursor() %>

When going through Shortcuts, the second step often fails. As far as I can tell, Templater's cursor placeholder expansion only works when the note is both focussed and in edit mode, and during automation runs, this might not always be the case.

The fix

Run the Obsidian command "Templater: Jump to next cursor location" using the Trigger Command action. This will bring Obsidian to the front and execute Templater's command, which will set the cursor:

The note needs to be in edit mode for that, mind.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Carlo Contact Carlo