quickadd
quickadd copied to clipboard
QuickAdd note to currently active path
Describe the solution you'd like It would be great if there was a variable such als {{VALUE}} only for the path currently open by the active note.
Even better would be something like {{PATH}} presenting users with a "current path" preselection they could override by entering any specific path
Ideally, this process of filling out the path would work like the rest of Obsidian in terms of autocomplete. So,
folder/folder/folder/folder/goal
woudl automatically be found by typing
goal
PS
LOVING and USING the plugin A LOT! THANK YOU :)
I second this. It would be great to have a variable for obtaining the path of the file from which a QuickAdd template is activated so that one can create new notes inside the same folder. I'm right now trying to find a workaround for this.
Another, related matter, is that in a capture template, if no folder is specified then the file is just created in the root, irrespective of how Obsidian is configured. Under files & links in the general Obsidian settings one can specify a folder into which new files go, when they are created. One of the options are "same folder as current file". I think it would be quite nice if QuickAdd would honour this setting and then specifying the additional variable suggested above in a template could be the means to override the general setting.
create a script called activeFile.js with the code bellow
module.exports = async function add(params, settings) {
let activeFile = app.workspace.getActiveFile();
let activeFilePath = activeFile?.path;
settings.variables = { activeFilePath}
}
then create a macro
add the script add a capture, and type in {{value:activeFilePath}} in the file name input