| .eslintrc.json | ||
| .gitignore | ||
| LICENSE | ||
| main.js | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| styles.css | ||
| versions.json | ||
Tidy Titles
An Obsidian plugin that keeps your filenames tidy while preserving the human-readable title.
When you create a note and give it a name like This is my Node, Tidy Titles:
-
Slugifies the filename →
this-is-my-node.md(lowercase + hyphens by default, configurable). -
Stores the original title in frontmatter so nothing is lost:
--- title: This is my Node aliases: - This is my Node ---
Pair it with the Front Matter Title plugin to display the original title in the file explorer, tabs, and graph while the files on disk stay slug-clean.
Features
- Hooks Obsidian's native "New note" — create a note, type its name, and the filename is slugified and frontmatter is added automatically. Only acts on new, empty notes, so it never clobbers existing content or ordinary renames.
New note from titlecommand — a modal prompt with a live slug preview. Bind it toCtrl+N(and clear the core "Create new note" hotkey) in Settings → Hotkeys if you'd rather name a note in a modal up front than tidy the inline name afterwards. New notes go wherever Obsidian's Default location for new notes setting points.Rename note titlecommand — the way to change a note's title: a modal prefilled with the currenttitle:lets you edit it, then updates the frontmattertitle/aliasesand re-slugifies the filename to match. Also available by right-clicking a note in the file explorer, on a tab, or in the editor, and bindable to a hotkey via Settings → Hotkeys. Alias handling on rename is configurable (see Keep previous aliases on rename below).Rename current note to slug of its titlecommand — re-slugifies an existing note from itstitle:frontmatter (or its current filename), without changing the title.Rename current note's folder to a slugcommand — tidies imported or oddly-named folders.- Backlink-safe — renames use Obsidian's
fileManager.renameFile, so links to the note are updated automatically.
Configurable slug rule
The transform is a configurable regex replace (Settings → Tidy Titles):
| Setting | Default | Meaning |
|---|---|---|
| Hook Obsidian's "New note" | on | intercept native new-note creation |
| Lowercase | on | lowercase the title before applying the pattern |
| Pattern | \s+ |
regex of characters to replace |
| Flags | g |
regex flags |
| Replacement | - |
string each match becomes |
| Trim character | - |
strip this char from the start/end of the result |
| Add aliases | on | also write the title to the aliases list |
| Keep previous aliases on rename | on | on rename, keep earlier titles as aliases (link-safe); off replaces them with just the new title |
The defaults produce a kebab-case slug: This is my Node → this-is-my-node.
For a strict slug that also drops punctuation while preserving Unicode letters such as å ä ö, set:
- Pattern:
[^\p{L}\p{N}]+ - Flags:
gu
e.g. FSX: To Buy → fsx-to-buy.
The settings tab shows a live preview so you can see what your regex produces.
Installation (manual)
This plugin is plain JavaScript and requires no build step.
- Copy
main.jsandmanifest.jsoninto<your-vault>/.obsidian/plugins/tidy-titles/. - In Obsidian, open Settings → Community plugins, then enable Tidy Titles.