QuickAdd Plugin

Using this format syntax {{VALUE:A,B,C,D}} will spawn a suggester like this one

And whatever you select will become the value.
This could be useful for something like selecting a tag from a group of them, or anything else that calls for you choosing something.

Hope this helps!

3 Likes

Thanks!

1 Like

I feel a bit thick here - I have just installed QuickAdd and MetaEdit, mainly to use the supplied macro to find latitude and longtitude for Map View, but I cannot get it to work! And I have watched the GIF, and the video on how to install the TODOIST script (both of which move way too fast for me to follow!)
I either get {{VALUE}} at the top of my page, or an error, and I think it’s down to whether I set it as a Template, Capture, Macro, Multi… (but could be other configuration errors).
Is there a layperson’s step-by-step guide on how to do this…?
Many thanks.

Hi @richardm. I am working on a video guide to QuickAdd, which should help.

In the meantime, here are the necessary steps.

  1. Grab the script from this page. This can be done in multiple ways:
    1. By clicking the ‘Raw’ button, and then saving the ‘page’ (CTRL+S on Windows, probably command+S on Mac), or
    2. Copying the file contents and saving it as getLongLatFromAddress.js. The .js is crucial.
  2. Save the file to somewhere in your vault. It doesn’t matter where, as long as it’s in your vault.
  3. Open QuickAdd settings, and then click ‘Manage Macros’.
  4. Enter a macro name (I call mine ‘Mapper’), and click ‘Add macro’.
  5. The macro should appear. Click its ‘Configure’ button.
  6. There will be 3 input fields. Place your cursor in the one besides ‘User Scripts’, and it should display a suggester. Assuming you have no other .js files in your vault besides the one we just grabbed, it should be the only one shown. Either way, you’ll want to click it, and then click ‘Add’. It should get added as number 1.
  7. Go back to the QuickAdd main settings. Add a new choice with a name of your choosing. This choice should be a Macro choice, which can be selected using the dropdown next to the ‘Add Choice’ button. Add this choice, and then
  8. It will appear on the list of choices. Click the :gear: (gear) button for it, to configure it.
  9. Select the macro you’ve just created.
  10. Go back out of the QuickAdd settings. You can now run QuickAdd with the Run QuickAdd command in the command palette. The Choice you’ve made should appear.

When you activate the Choice, please do note that you need to be in the file that you want to activate it for.

I hope this helps :slight_smile:

4 Likes

That is so helpful @Christian - many thanks for taking the time to provide such detail!! The step I was tripping over was having to create (what feels like) two macros, or at least a ‘macro’ and a ‘choice’. I look forward to the video you are developing and exploring QuickAdd’s power.
Many thanks again for your generosity. :pray:

2 Likes

Hello friends!

I have a special MACRO choice to share with you related to the Workspaces Core Plug-in.

If use this plug-in a lot, you know that it doesn’t have in Command Palette the feature to define Hotkeys for Specific Workspaces.

Using QuickAdd and the fantastic Obsidian Advanced URI from our community friend @Vinadon we could achieve this!

Cenario

Obsidian Advanced URI has a feature that let the user open workspaces with a schema: obsidian://advanced-uri?vault=<your-vault>&workspace=main

QuickAdd - MACRO has a feature that let you define a command to a MACRO from a .js script

Conclusion: if you create a SCRIPT with the WORKSPACE schema, you could generate a MACRO to open a Workspace from a Hotkey!

What You Need

  • QuickAdd plug-in;
  • Obsidian Advanced URI plug-in;
  • A script file in .JS;

Script

This is the model:
module.exports = params => window.open("obsidian://advanced-uri?vault=<your_vault>&workspace=<yourworkspace>");

→ How to create the Script

  1. Open a Text Editor and Paste the model above
  2. Substitute <your_vault with your vaults name. My vault name is MARIA
  3. Substitute <yourworkspace> with the name of your workspace. My workspace is Home

In my case I would have something like this:
module.exports = params => window.open("obsidian://advanced-uri?vault=MARIA&workspace=Home");

  1. Save this text file as .js
  2. Paste this file at your vaults folder (any place you want)

This is my file:

Creating a MACRO with USER SCRIPT

When creating a MACRO, use the field User Scripts to select your .js file



… from this point you follow the ordinary steps to create an item in QuickAdd.


I hope you enjoy this feature as much as I do.

I wanna thanks to @Christian for helping with this feature. @Christian gave me the script and guidance to create this.

My thanks to @Vinadon for build this fantastic Obsidian Advanced URI and other plug-ins (Hotkeys for Templates, Specific Files ans Starred Files) that I use everyday!

If you like this, you should say thanks to @Christian and @Vinadon , not me :slight_smile:

Have a great day friends!

6 Likes

I’ve made a video guide to using the QuickAdd plugin.
It covers everything from installation to advanced features.

Give it a watch :point_down: Any questions? Feel free to @ me :smile:

Q&A on my website:
https://bagerbach.com/blog/how-to-use-quick-add-for-obsidian-with-examples/

6 Likes

@Christian great plugin and necessary to capture quick ideas!!!

Only a suggestion, how can we add a macro in the toolbar options for mobile? It will be a quick way to capture from anywhere.

It appears run quickadd but I can not find the macro I have just created.

Thank you!

You can click the :zap: button to create a command for your QuickAdd Choice. You can then add that command to your mobile toolbar under Mobile in the settings.

For macros, you’d need to create a Macro Choice and attach your macro to it with the :gear:. :slight_smile:

Hi, this is an awesome plugin. I am a noob and just discovered it and made my life easier. Thank you! Quick question. I am so sorry if you have already covered this. Is there a way to do a QuickAdd to a note in a different vault than the vault you are currently working in?

Hey @fierce_ninja, I’m glad you enjoy it.

Unfortunately, I do not know how to do that. Perhaps if it is a nested vault, you could do it.

The closest thing might be using the Advanced URIs plugin.

You are not the first to ask, though, so I think it would be worth exploring the feasibility of this feature in the future.

thanks for this great plugin, after watching your tutorial I found out what a great help it is really is.
in the video i thinks you said something about it working with MetaEdit plugin. how i can use these two together. i can already imagine some uses for this but i am not sure how that could be implemented

P.s. I just realized that you are the developer of MetaEdit too, so there must be some cool stuff possible

Hey @Archie, I’m glad to hear that you like it!

QuickAdd and MetaEdit can be used together, primarily through scripts and macros.

Here’s a very simple example of me deleting a tag from the YAML metadata in the active file.

const PROCESSED_TAG = "state/process";
module.exports = async params => {
    const metaEditApi = params.app.plugins.plugins["metaedit"].api;
    const activeFile = params.app.workspace.getActiveFile();
    if (!activeFile && activeFile.extension !== "md") {
        new Notice("No valid active file");
        return;
    }

    const currentTags = await metaEditApi.getPropertyValue("tags", activeFile);
    await metaEditApi.update("tags", currentTags.replace(PROCESSED_TAG, ''), activeFile);
}

This is activated using a macro.

2 Likes

thanks, i must learn a bit of JavaScript to use this plugin’s full potential. i guess i already can tune this script to replace such a tag with state/done for example.
learning from show cases of other people (like) this can help me with my automation project

1 Like

Hi!

This is a great plugin. Thanks!

I have one question: is there a way to copy macros or templates created in Quickadd between devices? I can’t find where they are stored in my hard drive…

Thanks!

Hey! Thank you.

They are in <your_vault_folder>\.obsidian\plugins\quickadd\data.json

Transferring that file between devices will transfer all of your settings.

1 Like

@Christian First of all, thanks for creating this very useful plugin.

I want to create a note from a template that has the datetime in the filename and asks for the title. So, basically whenever I use QuickAdd to add a file, I want to automatically prepend the datetime and asks for a title for the file. So, let’s say at 13:48 on 2021-09-06 I create with the name “my new file”. I want the filename to be
202109061348 new file name

Currently, I’m enabling the “File Name Format” option and use interested_directory/{{DATE:YYYYMMDDHHmm}}
to get the datetime. Then I add the title to the filename. I’m doing this many times during the day, and I was wondering if there is quick way of doing this.

Thanks

Hey @essi. Thank you!

Just to make sure I’ve understood you correctly:
You want to create a file which has the current datetime before the file name. And right now, you have the datetime part working, but have to manually write the title?

In that case, you can use {{VALUE}} or {{VALUE:variable name here}} after the datetime. Like so:
interested_directory/{{DATE:YYYYMMDDHHmm}} {{VALUE}}

The two act slightly differently, though. Here are the details:

Basically, {{VALUE}} asks for any given value - but would also be the value of your selected text (if any). {{VALUE:variable}} will always ask you for a value - unless you have given that variable a value (relevant in macros or when writing it in multiple places).

6 Likes

Thanks @Christian That was exactly what I’m looking for!

Thank you, Filipe! This is just what I was looking for :clap:

I used it to create a workaround for opening workspace with the current day Workspace Plugin Improvements: Save current workspace and open with today's note - #8 by renarl.

1 Like