Obsidian Code Snippets

Mad Machine
3 min readApr 22, 2022

My note for installing and using snippets to tweak Obsidian.

This is my note for installing code snippets for the Obsidian note-taking app.

There are bits and pieces of information scattered through the Internet, so it took a little while to find how to do this properly. This post consolidates this information that may help others as well.

Each vault can be customized independently. To find where your vault is stored, press the “open another vault” button at the bottom left section of the app screen.

Press the three vertical dot button for the vault you want to tailor (this should say “more options”:

You should see an option to reveal the location in the Finder app:

It will open up Finder and take you to that location.

If this is your first time creating snippets, there won’t be a snippet folder, so you’ll need to create the snippets folder in the .obisidian folder.

You can then create your snippet file with the .css extension and place your CSS code into that file. In the example above, I created the line_wrap.css file.

The last step is to enable the CSS in the settings. Open the settings, select “Appearance,” and switch on the switch for the CSS file you created.

Hopefully, this makes it easier for you.

Please consider joining Medium as a paying member. It’s $5 for unlimited access. And if you use the following link, it will go a long way in supporting me as a writer.

Mad Machine

I’m a DevOps engineer, but I love to tinker with all kinds of technologies.