Skip to content

Tags

A tag is a word with a # in front of it, written wherever it belongs — in a task, in a sentence, in the front matter at the top of a note. mdai indexes every one of them across the whole vault.

A tag stays plain text in your note; mdai reads it into an index on your computer, and the panel and the filter use that index.

Notes from the site visit #client/acme #site-visit
- [ ] Send the revised drawing #client/acme @2026-09-20

What counts as a tag:

  • Letters, digits, _, - and / after the #. Letters means any alphabet — #učenje, #Träume and #проект are tags.
  • / lets you nest: #client/acme is one tag, and it reads as a path.
  • The # must come after a space, a tab, or at the start of the line. This is what keeps https://example.com/#pricing from becoming a tag called pricing.

If a note starts with a front matter block, its tags: key is read too, in either shape:

---
title: Site visit
tags: [client/acme, site-visit]
---
---
title: Site visit
tags:
- client/acme
- site-visit
---

The rest of the front matter is deliberately not searched for inline tags — in YAML a # starts a comment, and a comment you wrote is not a tag you meant.

Tags at the top of the Files panel opens the same list right under its row; click a tag there to see where it is used. The full panel:

View → Toggle Tags.

A tag that contains / is one tag that reads as a path, so the panel shows the tags as a tree: #client/acme sits under #client. A tag with tags beneath it starts collapsed — the arrow opens it, and what you open stays open until you close mdai. The number next to a tag counts every line of that tag and of every tag beneath it: #client counts the lines of #client/acme too.

Click a tag name to see its places: the file, and the line of text around it. For a tag with tags beneath it, the list includes their places as well. Click a place and the note opens there. All tags takes you back to the tree.

Each row has a small button for the filter. It starts as +; click it once to require the tag (✓), again to exclude it (−), and again to take it out of the filter. The filter returns files, not lines: a file must have every required tag and none of the excluded ones. A tag in the filter matches the tags beneath it too. The button above the results clears the filter.

An empty vault says “No tags in this vault.” If a tag has just lost its last occurrence, opening it says “No files carry this tag any more” rather than showing you a stale list.

The Tags panel and the Todo panel read tags with the same rule — one piece of code, not two. A tag the panel counts is a tag the task carries, and there is no third interpretation hiding anywhere.

  • Tasks — tags on tasks, with dates
  • Search — for finding text that is not a tag