Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(little) Conflict with "Filename Heading Sync" #17

Open
Oskiator opened this issue Feb 6, 2022 · 5 comments
Open

(little) Conflict with "Filename Heading Sync" #17

Oskiator opened this issue Feb 6, 2022 · 5 comments

Comments

@Oskiator
Copy link

Oskiator commented Feb 6, 2022

Hi !

I've just tried your plugin and love it !
I've met a little conflict with the "Filename Heading Sync" plugin which sync the file name with the H1 of the note.

So when I create a new note with the sync of the title and the automatic addition of the template : The following actions are done :

  1. I create the new note
  2. Filesync sync the filename with the title and so add to the top of the note "# title"
    image
  3. Hotkey for template add automatically a template to the note at the beginning of the file so before the "#title"
    image
  4. Filesync sync again the title
    image

Consequence : the title appears both at the beginning and at the end of a note, instead of just being on the top.

Solution : Add a way to consider the H1 title created by "Filename Heading Sync" and add the template below.
Solution 2 : Delay the action of "Filename Heading Sync" , so that the template is first loaded and then the title synced.

Would it be possible to implement one of those solutions ? I can also open an issue on the side of the Filename Heading Sync plugin.

Many thanks for your work !

Michaël

@Vinzent03
Copy link
Owner

First, thanks for the great documentation of the problem. You are using normal Obsidian templates right? Not the templater plugin ones. Will investigate.

@Oskiator
Copy link
Author

Oskiator commented Feb 7, 2022

Thanks for your fast answer and your work Vinzent. I'm effectively using the normal obsidian templates.

@Vinzent03
Copy link
Owner

Hmm I can't reproduce. My template is inserted after the heading, so it doesn't duplicate.

@Oskiator
Copy link
Author

Oskiator commented Feb 7, 2022

Thanks. Following your answer, I've done some test with a new vault and I didn't have the problem I've mentionned to you. Then I played with obsidian config files, adding files of my usual vault to the new one. And then deleting/readding parameters to isolate the "problematic" one. I finally found it. It's option "legacyEditor". When legacyEditor is disabled, the template is inserted before the synced title.

@Oskiator
Copy link
Author

Oskiator commented Feb 8, 2022

I'm back and I see another little problem always related to the "Filename Heading Sync" plugin.

Context :

  1. Several notes are open
  2. Filename Heading Sync is activated
  3. I creating a new note in a folder set up with automatic template with Hotkey for template

What happen ?
The content of the template appears briefly and is immediately replaced by the title of the file,
When doing Ctrl + Z, the title disappear and is replaced by the template.

Here is a demo : https://sharing.clickup.com/clip/p/t2488852/7e587c9a-bdd0-4833-abe9-5de27e3072ec/screen-recording-2022-02-08-14%3A50.webm

It seems that both plugin compete.

Have a nice day ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants