Closed zachpoblete closed 1 year ago
Why would you want the snippet trigger to contain {}??
I bet you wouldn't have that issue if your trigger was .alt
for example.
Thanks for your .alt
suggestion. Just to clarify, these brace snippets actually come with the extension. You can find them at %USERPROFILE%\.vscode\extensions\thqby.vscode-autohotkey2-lsp-1.9.0\syntaxes\ahk2_common.json
(replacing 1.9.0
with your version of the extension).
In my opinion, the triggers for snippets like {Alt Down}
should contain {}
because that is how users would first think to trigger them. If the trigger for {Alt Down}
were .Alt Down
, that would have to be explained in the documentation. It's easier for users if what they intuitively think would work, using {Alt Down}
as the trigger, works.
In solving the original issue, I see two possible options.
{Alt Down}
to .Alt Down
, but that runs into the issue of intuitiveness.{Alt Down}
with {Alt Down}
.Again, thanks for your suggestion. I'll try it out if option #2 turns out not to be possible.
I thought you created it yourself.
well, you dont have to type the {}
toget those suggestions.
I just typed alt
and selected it from the list and got it to show up correctly.
Yup, that works in most cases, except in the specific case I opened the issue about.
Send('b')
If I want to insert {Alt Down}
after b
by just typing the letters, the suggestion would never pop up.
Send('balt')
because balt
isn't a trigger.
Also, in your gif, {Alt Down}
isn't the 1st suggestion but the 3rd, so typing just the letters takes more time.
that is correct, in the first case you'd have to add a space and later remove it.
probably the way to go is that the {
shouldnt be auto closed if we are inside of a string (same with other auto close characters like [
or (
but that would be annoying in other cases).
not sure if that is possible though, @thqby would confirm how that works.
Remove the {
in the completion to adapt to all situations
Remove the
{
in the completion to adapt to all situations.
I think the issue can be considered. As inputting "se"
will automatically complete "Send"
, rather than "sSend"
. The same should be applied to "{A"
too, just like what "se"
does.
In this case, you need to invoke it with
{
because of theb
at the start.This goes for any of the other brace snippets like
{Shift Up}
,{Click}
, etc.