Show All Tags for Current File

Let’s say I have a file that keep track of a list of books I want to read

- Book 1
- Book 2 #read
- Book 3
- Book 4 #read

I want to figure out an easier way to find all tags for this file. Ideally, it should look like the pane that show the backlinks, outlines or out-links.

My current workaround is to search “#” in the current file.

I searched the forum and community plugins but I don’t find anything. Any suggestion will be appreciated.

My suggestion:

  1. Install Dataview plugin (I begin to be repetitive by always suggesting the same plugin :slight_smile:)
  2. To find all the tags used in your note, you can write a query like this (note: in dataview queries are dynamic, i.e., they reflect the changes you made to your note):


LIST join(file.tags, ", ")
WHERE contains(file.path, this.file.path)

Thanks for the suggestion!

The query returns a list of tags. Is it possible to render things like? (show the context / the same line where the tag is located)

- Book 2 #read
- Book 4 #read

With simple dataview queries that’s no possible. Dataview working with “data”, not generic content.
You can try query blocks (using the obsidian search in codeblocks). Try this:

file:"your file title" tag:#read 

(“your file title” to restrict the search to that file)

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