Many obsidian users have multiple plugins installed. Many plugins redefine the value of specific settings making it hard to change those settings.
Here are some example:
These commonly used plugin redefine the date format:
- Daily notes core plugin
- Templates core plugin
- Dataview community plugin (the date format is not defined the same way, this plugin only takes lower case
ys for the year format, everywhere else upper case
Ys are used)
- Natural language dates
Imagine a scenario where a user wants to change the date format. The user will need to open all plugins making sure all formats are the same (of course we might want different formats on different plugins, this will be tackled in the proposed solution).
These commonly used plugins require defining the folders for templates or assets or more:
- Templates core plugin (for the templates folder)
- Templated community plugin (templates folder, template hotkeys)
Now imagine I decide to move my templates to a different folder or change the folder structure, I will need to update all plugins individually
With this solution, we could define vault settings for the most used values like template folders, daily notes folders etc and make these values accessible to plugins. This will allow centralising the controls in case of changes.
For backward compatibility and to allow flexibility, plugins can override these settings so existing plugins not using the new values will just use the internally defined values. Same is in case a plugin wants to use a different format for dates that the one globally defined.
The issue with the approach above is that some of these settings do not belong to Obsidian core features and there are no criteria to define what should be a global or a plugin-specific setting.
To overcome this, we can allow the definition of vault variables and allow the use of such variables in plugin settings.
- In the vault settings:
$DATE_FORMAT = YYYY MMM dd
- In the Daily notes plugin settings, in the “Date format” field, the user can type a date format or use an existing variable (ideally with autocomplete).
This way it’s up to the user to decide what should be reused.