New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin: Split allow for named Split* [[split_name]] to generate [[sp_name=1]] #48

Closed
lintalist opened this Issue Oct 4, 2015 · 2 comments

Comments

Projects
None yet
1 participant
@lintalist
Owner

lintalist commented Oct 4, 2015

Currently this won't work as both instances of [[sp=1]] are being replaced at the same time so the result that is displayed at the third line is not the first part of the SplitRepeat but of the first Split

[[Split=selected|\t]]
[[SplitRepeat=[[sp=1]]|\s]]
result=[[sp=1]]

Allowing for Named Splits might resolve this:

[[Split_MyName=selected|\t]]
[[SplitRepeat_OtherName=[[sp_MyName=1]]|\s]]
result=[[sp_OtherName=1]]

Source: question by afh @ http://www.portablefreeware.com/forums/viewtopic.php?p=76250#p76250

@lintalist

This comment has been minimized.

Show comment
Hide comment
@lintalist

lintalist Dec 18, 2015

Owner

Added to dev version here https://github.com/lintalist/lintalist/archive/dev.zip (not yet documented but the above example should work)

a1 a2 a3    b1 b2   c1 c2

[[Split_MyName=selected|\t]]
[[SplitRepeat_OtherName=[[sp_MyName=2]]|\s]]
result=[[sp_OtherName=1]]

result=b1
result=b2

Owner

lintalist commented Dec 18, 2015

Added to dev version here https://github.com/lintalist/lintalist/archive/dev.zip (not yet documented but the above example should work)

a1 a2 a3    b1 b2   c1 c2

[[Split_MyName=selected|\t]]
[[SplitRepeat_OtherName=[[sp_MyName=2]]|\s]]
result=[[sp_OtherName=1]]

result=b1
result=b2

@lintalist

This comment has been minimized.

Show comment
Hide comment
@lintalist

lintalist Jan 16, 2016

Owner

v1.7 released https://github.com/lintalist/lintalist/releases

A quick note about the "named splits" - just in case you're wondering how useful the [[split]] plugin is, here is a short example how you can use it to create a Snippet with "logic".
You can use Choice (or another Plugin) to select an item and use that output to update other parts of the snippet.

[[Split_C1=[[choice=1   Option1|2   Option2|3   Option3|4   Option4]]|\t]]
[[Split_CSub=sub1 sub2 sub3 sub4|\s]]

You made Choice Number [[SP_C1=1]]
And the sub-selection that goes with it is:
[[SP_CSub=[[SP_C1=1]]]]

This will ask you to make a Choice from Option1..4, and if you pick Option3 it will use "3" as a selection criteria for another Split.
So if the above snippet would have the following output (if you select Option3):

You made Choice Number 3
And the sub-selection that goes with it is:
sub3

More can be found here http://lintalist.github.io/#combiningsplit

Owner

lintalist commented Jan 16, 2016

v1.7 released https://github.com/lintalist/lintalist/releases

A quick note about the "named splits" - just in case you're wondering how useful the [[split]] plugin is, here is a short example how you can use it to create a Snippet with "logic".
You can use Choice (or another Plugin) to select an item and use that output to update other parts of the snippet.

[[Split_C1=[[choice=1   Option1|2   Option2|3   Option3|4   Option4]]|\t]]
[[Split_CSub=sub1 sub2 sub3 sub4|\s]]

You made Choice Number [[SP_C1=1]]
And the sub-selection that goes with it is:
[[SP_CSub=[[SP_C1=1]]]]

This will ask you to make a Choice from Option1..4, and if you pick Option3 it will use "3" as a selection criteria for another Split.
So if the above snippet would have the following output (if you select Option3):

You made Choice Number 3
And the sub-selection that goes with it is:
sub3

More can be found here http://lintalist.github.io/#combiningsplit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment