Add closing tags automatically?

What I’m trying to do

Whenever I type the opening tags for Templater (<%) or Dataview (```), I would like the closing tags to be added automatically. I’ve seen this just happen in Youtube videos and I have scoured the internet extensively but found no solution for why this doesn’t work on my MacBook.

I am used to this just working in VS Code, where I type an opening tag e.g in HTML and it immediately closes the tag when I hit the space bar or tab key.

Any ideas?

Things I have tried

I have googled for this for a good hour and couldn’t find anything - mostly because the word “tags” always led me to other topics, like hashtags. I’ve also checked out the hotkeys and tried a variety of combinations. Sadly, they all didn’t work.

You can try plugin Text Snippets.
Here is an example of snippets for autocorrect.

tp : <% $end$ %>
dw : ```dataview $nl$ $end$ $nl$```

1 Like

Thanks, that works for me!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.