quickadd icon indicating copy to clipboard operation
quickadd copied to clipboard

[FEATURE REQUEST] Adding a filename of active window {{filenamecurrent}} to the quickadd created note like {{LINKCURRENT}}

Open Ravenclawer opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] when we place {{LINKCURRENT}} in a template and use quickadd to create a new note based on this template, the link to the current active file will appear in the new note. Instead of placing the link to the active note in the new note, I just want to place just the name of the current note in the new note. So, maybe it's nice to add a {{filenamecurrent}} Format syntax to make it possible to add the name of current active file to a newly created file directly. Describe the solution you'd like A clear and concise description of what you want to happen. Haven't found any solution yet, but I will try to go through the documentation of Templater plugin to see if there are any solutions there. Additional context Add any other context or screenshots about the feature request here.

Ravenclawer avatar May 20 '23 03:05 Ravenclawer

@Ravenclawer - I also wanted this. I looked at the code to see how I could add LINKCURRENT replacement for the filename, but I had trouble figuring out where the different template settings get plugged in.

As a workaround, I am using the Obsidian Filename Heading Sync plugin.

Instructions

  1. Install & enable the plugin
  2. Disable the Use File Open Hook option in the plugin's settings.
  3. Exclude your templates directory. For me that's Templates/*
  4. Set up the template to have the first heading use {{LINKCURRENT}}. e.g.
# {{LINKCURRENT}} - <% tp.file.title.split("- ")[1] %>

After you Quick Add a note, the first time you save it, it'll rename the file to the heading.

muness avatar Apr 20 '24 14:04 muness