No description
Find a file
2025-05-11 21:51:13 +02:00
images docs(readme): add before/after preview image to showcase file name styling 2025-04-14 14:32:14 +02:00
src chore: remove debug logging from load/unload and settings conversion 2025-05-11 21:51:13 +02:00
.editorconfig chore: clean up tsconfig update editorconfig 2025-04-13 14:52:10 +02:00
.eslintrc.cjs refactor: split plugin into class files, add types and formatting config 2025-04-13 18:43:06 +02:00
.gitignore Release v1.0.0 – initial plugin version 2025-04-12 11:57:23 +02:00
.prettierrc.cjs refactor: split plugin into class files, add types and formatting config 2025-04-13 18:43:06 +02:00
esbuild.config.mjs refactor: split plugin into class files, add types and formatting config 2025-04-13 18:43:06 +02:00
eslint.config.js add isDesktopOnly + lint config fix 2025-04-13 12:03:37 +02:00
LICENSE Release v1.0.0 – initial plugin version 2025-04-12 11:57:23 +02:00
manifest.json chore(release): bump version to 1.2.3 2025-04-24 10:02:09 +02:00
package.json chore(release): bump version to 1.2.3 2025-04-24 10:02:09 +02:00
README.md docs(readme): add before/after preview image to showcase file name styling 2025-04-14 14:32:14 +02:00
styles.css feat: add support for custom file icons via CSS variable 2025-04-13 19:09:50 +02:00
tsconfig.json refactor: split plugin into class files, add types and formatting config 2025-04-13 18:43:06 +02:00
version-bump.mjs update version bump formatting and add editorconfig 2025-04-13 14:32:52 +02:00
versions.json chore(release): bump version to 1.2.3 2025-04-24 10:02:09 +02:00

FileName Styler

FileName Styler is a plugin for Obsidian that allows you to hide, modify, and decorate parts of file names in the sidebar based on patterns or folder locations.

Originally created as simple “Zettelkasten ID Hider,” this plugin has evolved into a flexible tool for styling file names based on regex or timestamp-based IDs.

Special thanks to Simon for the original idea and inspiration behind this plugin.


Features

  • Hide timestamp-based IDs (8-, 12-, or 14-digit) from file names
  • Support for custom regular expressions with 3 capture groups
  • Add custom prefixes and suffixes to matching file names
  • Apply custom colors and custom file icons (e.g. 🧠 or 📖)
  • Restrict styling to specific folders only
  • Combine multiple styling profiles different styles for different folders or file types
  • Automatically restore original file names and styles when unloading

Preview

Heres a quick before/after look at how file names appear with and without styling enabled:

File name styling example


How it works

This plugin searches for matching file names based on selected ID formats:

  • yyyyMMddHHmmss → 14-digit

  • yyMMddHHmmss → 12-digit

  • yyyyMMdd → 8-digit

  • or a custom regular expression, such as:

    ^(\d{6})([-_ ]?)(.+)$
    

It then applies the configured styling to each match within the File Explorer (without changing the actual file name on disk).


Settings

You can configure and combine multiple profiles. Each profile supports:

  • ID format Choose from predefined timestamp formats or define your own regex
  • Move ID to end Display the ID at the end of the file name instead of the start
  • Custom prefix Text to prepend to the displayed name
  • Custom suffix Text to append to the displayed name
  • Custom text color Optional color override
  • Custom icon Emoji or Unicode (e.g. 🧠, 📖)
  • Folder filter Apply profile only in certain folders

All profiles can be toggled independently and are applied in order.


Installation

  1. Download or clone this repository.

  2. Copy the following files into your Obsidian vault under:

    .obsidian/plugins/filename-styler/
    

    Required files:

    • main.js
    • manifest.json
    • (optional) styles.css
  3. Enable the plugin in Obsidian under Settings → Community Plugins.


Compatibility

Compatible with Obsidian v1.8.9 and higher. Earlier versions might also work, but have not been tested.


License

MIT License.


Created with ❤️ by and for the Obsidian community.