Allow users to turn off tags or customize tag recognition

There are many instances in which a # might appear in text and NOT be intended as a tag.

In particular:

  • CSS hex color values
  • anchor links, or anchors appended to URLs

I have many junk/useless tags in my notes repository because every single note I have that contains one of these two things thinks that’s a tag, when it’s clearly not.

I’d like to be able to “ignore” or “turn off” these tags from the tags panel.

Alternatively, I’d like to be able to customize Obsidian’s tag recognition. For me, I would set it so that it only recognizes a tag when it sees the regex ^#\w+. I’d gladly sacrifice the ability to create tags inline with other text to get rid of these useless junk tags.

And to be clear: I am not willing or able to edit the relevant markdown files to remove those # since they are important to the content. That would break the code snippet or link in question.

3 Likes

You can use a backslash \ before the # to force Obsidian to treat it as regular text. For example:

This \#word will not be treated as a tag.

The backslash will be invisible in preview mode.

The backslash also works with any other Markdown special characters to turn them into normal characters.

@Craig That’s not terrible, I discovered this shortly after writing this post as well. The issue is that then I have to switch to preview mode if I want to copy that code snippet in a way that can be immediately used. I do still wish they had a feature that would allow you to ignore a tag pattern globally, or in specific file, or specific directory, or let you customize the regex for what is and is not recognized a tag.

Then again from what I’ve heard it’s just two guys building this entire thing, so I’m sure they have bigger priorities to address, and frankly their progress/the quality of the product is amazing. But hopefully some day they have the luxury of getting to niche use cases from cranky forum users.

1 Like

I’m not sure I follow what exactly do you mean by “disabling” tags, but for what is worth:

  • It is already possible to customize how tags look using CSS (a search on the forum would reveal how). It might be possible to disable what happens when you click them too, I’m not sure.
  • You can also disable the tag pane

Things not currently possible:

  • Disabling tag autocompletion
  • Possibly, disabling clicking of tags in preview mode.