I'm a bit confused about this action.
When I add more lines to add more variables, what format should I use?
In here it shows regular names with capital letters, spaces, etc, even though it says it's a field for variables. Aren't variables supposed to have no spaces?
Are those names saved as local variables? Global variables? Does KM automatically remove all spaces?
So if I set mine to this:
Will it save as a variable? If so, will it be a global or local?
If it's local, will it automatically convert it to something specific?
EDIT: Ok so I was reading another page, and it seems that variables can have spaces.
That being said, does it mean that variables inside an Input Form will be saved as global automatically?
EDIT 2: So I noticed that it creates a global variable, which is not ideal. If I type "local_Full Name", when the prompt pops up it shows "_Full Name". Is this the right way to set a local variable there? I don't really care about how it looks, because it's just my personal workflow, but I'm curious if I'm missing something?
Oh ok. I didn't know that. Good to know. Thanks for sharing.
I guess I will start using double underscores from now on, regardless of where I'm using it. Also, any special reason you use Local instead of local?
Now that we are digging these gems... haha
Ok. I usually use small caps as the first letter and then use the camel case format.
Even though I'm not a developer myself, I remember getting that "tip" when I was playing around with JavaScript as people said it's a good practice.
I use something similar to your first option, by using Mac's "Text Replacement" or Raycast's snippets.
I tend to use Text Replacement more often, because it syncs with my iPhone.
So usually my "snippets" start with $
For example, my email is assigned to $dwe (danny wyatt email)
I have a lot of those for emojis I use quite often as well for example $handsup will show
I even have some assigned to longer sentences.
I will test your macro and see if I can use it myself.
Thanks for sharing!
I start typed string triggers with ;, and also use that as an end marker if the end isn't otherwise obvious. An optional v for if I want to include %Variable%, one of [gpiv] for scope, then the variable name, and finally ;.
So ;vgmyArray[1]; expands to %Variable%Global__myArray[1]%, ;ltheText; expands to %Local__theText%, etc.
Obvs, you could do something like just automating the "wrapper" insertion then a ← to put the cursor in the right place ready for you to type the variable name -- your trigger would then be ;vg;, ;l;, and so on.
I find it easier to use one "command" with various arguments to do variations on a theme -- this expansion can be used whether you are in a text or calculation field, and for whatever scope you want -- rather than having different things for each. YMMV.