Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Join the community
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Filename Heading Sync

dvcrndvcrn66k downloads

Keep the filename with the first heading of a file in sync.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates25

This is a Obsidian plugin to keep the filename and the first heading of a file in sync

demo

Note: This plugin will overwrite your first heading at the top of the file the moment you open it, so this can be considered destructive.

Discussion on the obsidian forum here

Features

  • When renaming the current file -> will update the heading
  • When opening a file that doesn't have a heading yet -> will insert one
  • When opening a file with a different heading than the current file name -> will update the heading
  • When updating the heading of a file -> will rename the file

If you're not a fan of automatic renaming you can also disable the "File Save Hook" and "File Open Hook" in settings and just use the manual sync commands (thanks @mnaoumov!)

This plugin conflicts with plugin X, how do I solve this?

  • First check if this is already solvable by adding a regex rule. For example if your file always ends in myfile.foo.md (ending foo), you can exclude this globally by adding the following regex rule in the plugins settings: .*\.foo\.md

  • If that didn't do it, see if the other plugin acts on file-open. If it does, you can go into the settings of this plugin and disable the 'file open hook' as a workaround. (You can also fully disable automatic syncing by disabling 'file save hook' as well)

  • If this still didn't solve the issue, open a new issue with steps and examples how to reproduce the problem.

Conflict with 'templater'

Disable the file-open hook in settings and they should play together nicely (#40)

Current limitations and to do

  • When renaming a file that isn't the current file, nothing will happen. The heading will get updated the next time the file is opened in edit mode
  • Special characters that obsidian can't handle will get auto-stripped

Development

Building the Plugin

To build the plugin for production:

npm run build

Watch Mode with Auto-Sync to Obsidian

If you want to develop with automatic syncing to your Obsidian vault, you can set the OBSIDIAN_PLUGIN_PATH environment variable to point to your plugin directory:

export OBSIDIAN_PLUGIN_PATH="/path/to/your/vault/.obsidian/plugins/obsidian-filename-heading-sync"
npm run dev

The watch build will automatically copy the compiled plugin files to your Obsidian vault whenever changes are detected.

Alternatively, if you're using just, you can use:

export OBSIDIAN_PLUGIN_PATH="/path/to/your/vault/.obsidian/plugins/obsidian-filename-heading-sync"
just watch-sync

LICENSE

MIT

74%
HealthGood
ReviewCaution
About
Sync filename and first heading bidirectionally: renaming a file updates its first heading, and changing the first heading renames the file. Insert a heading if missing and update on file open — warning: opening a file will overwrite its top heading.
FilesEditingAutomation
Details
Current version
1.11.0
Last updated
2 months ago
Created
5 years ago
Updates
25 releases
Downloads
66k
Compatible with
Obsidian 0.11.0+
Report bugRequest featureReport plugin
Author
dvcrndvcrn
github.com/dvcrn/obsidian-filename-heading-sync
GitHubdvcrn
  1. Community
  2. Plugins
  3. Files
  4. Filename Heading Sync

Related plugins

Advanced URI

Control everything with URI.

Remember cursor position

Remember cursor and scroll position for each note.

Thino

Quickly capture memos and display them in the sidebar with a heatmap. (Closed source)

Note Refactor

Extract note content into new notes and split notes.

QuickAdd

Quickly add new notes or content to your vault.

MetaEdit

Manage your metadata.

Templater

Create and use dynamic templates.

Advanced Tables

Improved table navigation, formatting, and manipulation.

Outliner

Work with your lists like in Workflowy or Roam Research.

BRAT

Easily install a beta version of a plugin for testing.