{{cursor}} template variable

The idea is to automatically move the cursor to {{cursor}} placeholder after inserting a template. For example if a template note looks like this:

**{{date}}** at **{{time}}**

{{cursor}}

---

(like for a daily journal entry), I want the cursor to end up exactly where {{cursor}} is – in the middle of the note, right after the template is inserted.

I know this might seem a bit silly, like I’m just too lazy to move the cursor myself but I think it could actually be pretty useful for streamlining workflows, especially with repetitive entries.

2 Likes

Hello,

You can auto-place the cursor using template tools:

Obsidian (Templater plugin): Use <% tp.cursor() %>

VS Code: Use $0 for the final cursor spot

Espanso/TextExpander: Use {{cursor}} or %|

Custom script: Insert text, find {{cursor}}, place cursor there programmatically

Best Regard,
Darif