Tags format in frontmatter

What I’m trying to do

Hi all,

I am new to Obsidian. Loving it so far!

Anyway I am having the following issue.

In the frontmatter tags can be displayed in one of the following ways:

tags: tagA, tagB

OR

tags:

  • tagA
  • tagB

I want them displayed the first way all in one line. This is because I have some dataview queries that list notes in my vault and I print the tags out with the link to the note. If I have the tags dislayed the second way above in the spread across multiple lines in my table.

If I edit my tags in source mode it keeps them all in one line. However, as soon as I edit them in preview mode or the file properties window it formats them in a list over multiple lines.

How can I fix this?

Thanks!

Things I have tried

I am using the metadata menu plugin and I have the setting for tags set to Array instead of list.

I also have turned off the section in the linter plugin that formats the tags.

Unfortunatelly, the only way for now afaik is to manually edit your tags, i.e., set “Properties in document” to “Source” in Options - Editor - section “Display”. The graphical user interface will format them line by line, and there currently is no way to change that behavior.

1 Like

Ah Ok I suspected that may be the case as I played around with it for a while. And I believe that having them in an indented list is the way they usually are formatted in yaml.

Anyway thanks for the quick response :slight_smile:

You can use the Linter-Plugin. There is a setting in General > YAML tags section style > use “multi Line”. Then you can go to General > Lint on file change > “on”. This should format all your tags into mutli-line when you close or switch notes.

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