Newbie question - can't get {import} to work

I'm kind of a newbie, but just wanted to check that this is correct syntax to use for {import:snippet}

I'm trying to get {import:snippet} to work ...

But when I try the above test-snippet, which I titled "test of import",

which attempts to "invoke" the pre-existing snippet titled "date of last visit",
and uses the following syntax {import:date of last visit},

I get this error instead when I type ";;toi" (the shortcut to invoke the snippet)

[Error - Could not find snippet: date of last visit] was the date of the last visit. (this is a test)

Any ideas how to fix this, so it works?
I just want it to invoke the predefined snippet within the new snippet. This is what it is supposed to do, is it not?

Thanks!

OK So I answered my own question - but it does not seem at all intuitive.

What I did this time was I discovered the "Dynamic Menu" at the bottom of the screen will walk me though a snippet import in a way that works

But it does so by creating a completely non-intuitive text that looks like this: {import: backslash;backslash;dol}

There is no way I would have figured out that the format required was that the two semicolons in my original text string required each to be preceded by a backslash.

Problem is solved from a practical POV - I'll just use the "dynamic menu" when I want to import

... but still it seems kind of odd + not clear.

Thanks for creating the Dynamic Menu! That's a great feature that I just noticed.

Hi Matt,

This is complicated in your case as your snippet shortcut has a ";". The ";" has special meaning in Text Blaze within replacement commands as it is used to separate attributes (e.g.: "{time: lll; shift=1W}").

To enter a ";" as plain text without triggering its special meaning you need to put a backslash in front of it. The dynamic menu does that for you. Other special characters that need this are "=", "{" and "}".

If your snippet didn't have any special characters, you could just enter it without backslash. E.g. for "/snip" you could just do "{import: /snip}" or for ".go" you could just do "{import: .go}".

2 Likes

Thanks for the detailed and clear explanation Scott...

That makes perfect sense.

It occurs to me that in your documentation it might be helpful to clarify that {import} needs as its attribute, the actual key-combo for the snippet, and not the "name" of the snippet (i.e. the title that you give it in your collection). That is a small point - but one that I did find confusing at first.

Thanks again!

I really appreciate your fast turnaround, and I also have tremendously appreciated using this well-designed, highly functional product.

Happy to improve the docs, is this the page you were referring to?

Yes. Even just a quick explainer in the table under "Attributes" would help.

You have: 17

Maybe add a short line: "The shortcut of the snippet to import. This should be the snippet's exact hotkey sequence, not the name of the snippet."

You could even consider a "P.S" warning people when to use the backslash in order to deactivate special keys, like the semicolon.

Thanks!

We've updated this to make it clearer. Thanks!