Cursor placement in Templates plugin (preferably also for Daily Notes template)

You could use Templater’s tp.file.cursor(order?: number) function.

If you do, I’d advise changing the hotkey “Templater: Jump to next cursor location” to something like Ctrl+Tab (or Cmd+Tab) since default Alt+Tab (Opt+Tab) switches between applications on my Linux machine.

I use this in my Daily Notes template. After filling in the template data, it will jump to the first specified cursor location <% tp.file.cursor(1) %>, erase this text and put the cursor there to type.

When pressing Ctrl+Tab (in my case), it jumps to <% tp.file.cursor(2) %>, erases that text and positions the cursor there.

Thus, it’s only a “one-time jump-through”, but still quite helpful.

9 Likes