Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Obsidian Filename Heading Sync

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

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

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

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

LICENSE

MIT

About

Obisdian.md plugin to keep the filename and the first header of the file in sync

Resources

Stars

Watchers

Forks

Packages

No packages published