You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve been using some personal Dialog snippets for a while, and it might be a good idea to add them to the extension.
Here’s the list (as "name, identifier"), with the tab stops indicated with vertical bars. I’m not too sure about some of the things. I can make a pull request when we’ve settled them.
If statement, if:
(if) | (then),
|
(endif)
If-else statement, if-else:
(if) | (then),
|
(else)
%% Indentation is also inserted here.
(endif)
For if-else, we could remove the hyphen from the identifier, it would be less to type. (Or we could allow both, but it’s a bit redundant.)
Select statement, select:
(select)
|
(or)
%% Indentation is also inserted here.
(stopping|at random|purely at random|cycling|then at random|then purely at random)"
For the select statement, the cursor first jumps at the end, with an autocomplete pop-up to, ahem, select the variant, then goes to the content after the (select). I like it, but maybe we should also add a snippet for each variant (a stopping, an at-random and so on) directly too?
Collect statement, collect:
(collect |$Element)
|
(into |$List)
The cursor first jumps to $Element then to $List (so that the author can change the names), to end in the middle.
Collect words statement, collect words:
(collect words)
|
(into |$List)
The cursor first jumps to $List.
Accumulate statement, accumulate:
(accumulate |$Element)
|
(into |$Sum)
Same as collect.
Determine object statement, determine object:
(determine object |$Obj)
|
(from words)
%% Indentation is also inserted here.
(matching all of |$List)
I guess no regular author will ever use that one, but it’s here for completeness. Maybe we should remove the space in the identifier, or replace it with a hyphen.
IFID, ifid:
(story ifid) UUID
Where UUID is a UUID that has just been generated.
I don’t think there are others we could add?
The text was updated successfully, but these errors were encountered:
I’ve been using some personal Dialog snippets for a while, and it might be a good idea to add them to the extension.
Here’s the list (as "name,
identifier
"), with the tab stops indicated with vertical bars. I’m not too sure about some of the things. I can make a pull request when we’ve settled them.If statement,
if
:If-else statement,
if-else
:For if-else, we could remove the hyphen from the identifier, it would be less to type. (Or we could allow both, but it’s a bit redundant.)
Select statement,
select
:For the select statement, the cursor first jumps at the end, with an autocomplete pop-up to, ahem, select the variant, then goes to the content after the
(select)
. I like it, but maybe we should also add a snippet for each variant (astopping
, anat-random
and so on) directly too?Collect statement,
collect
:The cursor first jumps to
$Element
then to$List
(so that the author can change the names), to end in the middle.Collect words statement,
collect words
:The cursor first jumps to
$List
.Accumulate statement,
accumulate
:Same as collect.
Determine object statement,
determine object
:I guess no regular author will ever use that one, but it’s here for completeness. Maybe we should remove the space in the identifier, or replace it with a hyphen.
IFID,
ifid
:Where
UUID
is a UUID that has just been generated.I don’t think there are others we could add?
The text was updated successfully, but these errors were encountered: