Managing single and multi select fields in Obsidian with core plugins

Zachary Shirmohammadli
4 min readJan 23, 2023

--

There are many cases why you would want to implement the single select or multi select fields in the YAML frontmatter of your Obsidian note. One example would be to manage the state of a project by changing it from “To do” to “Doing” to “Done”.

To implement this, there are a variety of plugins in the Obsidian community. But I was not comfortable using either of those templates for just this use case. Then I was wondering how I can make this happen with just the core features of Obsidian. This is because using just the core features is much more simpler than relying on increasing number of plugins. I’m a minimalist and I love simplicity.

Here I will explain how you can handle single and multi-select fields in the frontmatter of your Obsidian notes. First, we will go through the theory behind this method, then we will see how you can increase your productivity using keyboard shortcuts and templates.

Using YAML comment is the way

The solution was actually quite simple. You just need to have a list field in YAML and comment out the list items that you don’t want. Let’s go with an example to make this clear.

Here’s the frontmatter of one of my notes:

Date: 2023-01-18
Alias:
Status:
- To do
- Doing
- Done
Tags: lnote

As things are right now, the status field has an array of values [To do, Doing, Done]. To disable any one of the list items, you just add a pound sign (#) before the hyphen. I want to disable Doing and Done right now:

Date: 2023–01–18
Alias:
Status:
- To do
# - Doing
# - Done
Tags: lnote

This way, the Status field only has the [To do] item in the array. Next, whenever you want to change the status, you just change which list item is commented out and which one is shown. This note is now done:

Date: 2023–01–18
Alias:
Status:
# - To do
# - Doing
- Done
Tags: lnote

I gave an example of how you might use this to manage a single select field. But you can totally use this for multi select fields as well. Just remove the comment for multiple list items and they will be enabled.

Using keyboard shortcuts to increase our speed

That whole process of commenting out and removing the comments can get a lot faster when you’re using keyboard shortcuts. Thankfully, Obsidian has us covered in that regard.

Commenting in YAML

In obsidian, when you want to turn a normal text into a heading 1, you add a # before the text. There is a hotkey in the settings you can choose for this function. I have set myself to the following:

Heading 1 `ctrl + alt + 1`

This will add the # before the text no matter where the text is in the document. That also includes the frontmatter. So, by just using the `ctrl + alt + 1` when the cursor is on a list item in the frontmatter, we can comment that list item out and make it disable.

Removing Comments in YAML

Removing the heading is also another functionality that is available in Obsidian. What this does basically is it removes the # signs before the text. I have set up the following shortcut in the hotkey settings of my obsidian.

Remove heading `alt + 1`

So whenever I want to remove the commenting from a list item in the YAML frontmatter, I place the cursor on it and press `alt + 1`. This way, the list item is enabled.

Using the power of templates

To fully benefit from the workflow I mentioned regarding managing the single and multi select fields in Obsidian, I advise that you use the Templates core plugin as well. In this plugin that comes with Obsidian itself, you can create a folder and create templates inside it. In those templates, you can define fields with preexisting YAML frontmatter where there are also the select fields. This way you don’t have to type the list items every time you want to create a note.

Final thoughts

I hope that this article has helped you get an insight on how to manage your single and multi select fields in your Obsidian. Let me know what you use to do this function in your vault in the comments section.

I’m an expert in using Obsidian and I make relevant content. You can follow me if you’re interested into this kind of thing.

Happy writing.

--

--

Zachary Shirmohammadli

I'm a web developer and designer trying to learn things and solve my and everyone else's problems.