Fun with espanso

Hello. Sorry to revive this old post with a somewhat unrelated question.

Is there a way to use espanso to copy two different texts and type something to paste them all at once? Here’s an example:

In Obsidian, if I wanted to link to an article or YT video, I’d type []() and copy & paste the URL into (), then do the same for the article/vid’s title in [] so that it only displays the title. But that’s twice the time and effort of copying, pasting and moving between windows.

To reduce that time & effort, I made this script:

- trigger: ":url"
    replace: "[{{title}}]()"
    vars:
      - name: "title"
        type: "clipboard"

I’ve currently set up espanso so that if I copy the article’s title and type :url in Obsidian, the output would be [{{title}}]() where {{title}} is the copied title pasted in []. I’d then manually copy & paste the URL in ().

While this is somewhat faster, it’s not that much, it still requires me to go back and forth between the browser and Obsidian windows.

I was wondering if there’s a way to copy the title first and immediately copy the URL after (or vice versa) and type :url to have espanso paste the two separate texts into the two different brackets all at once: [TITLE](URL). This requires me to only move from browser to Obsidian once.

Hope that makes sense. So far, I’ve found that you could only do this for what’s currently on the clipboard and not what was copied before it.

Also: should this be a separate post instead?