erinata/FingerText — Issue #24: Dynamic matching option sets for FingerText.
Author: trusktr
Created: 2012-02-24 23:52:02+00:00
State: open

it'd be nice if we could select an option in one location and also select the corresponding option in another location.

This is my problem:
I have:

$[![]!]

[>END<]

After I am done inserting a tag I will see something like `` if I choose the last option from the option set (it includes both id and class attributes). but if I choose the first option, I will be left with `` and if I choose the second option, I will be left with `` when I am done inserting the tag.

It'd be neat if we could match option sets. For example, if we have `$[2[(opt)|Option1|Option2|Option3]2]` and somewhere else you have `$[2[(opt)|OtherOption1|otherOption2|otherOption3]2]`, it'd be nice if the options sets get matched if they have the same number of options and same priority number. Since both option sets are number 2 and have the same number of options (three each), then when we choose an option during the first selection the corresponding option would appear at the location of the second selection.

If the numbers are different, or if the number of options doesn't match, then no matching would happen.

Here's an example:
Pretend we make a snippet like this:

$[![]!]

Currently when we type the triggertext for this snippet and press tab to insert the div element, we will be able to choose an option at the first location:

$[![]!]

It'd be nice if when we choose the third option in the first option set that the third option in the second option set also gets chosen like this:

$[![]!]

If we press the down arrow key to change the selected option of the first option set, then the second option set location would also be updated like this:

$[![]!]

Then, when we're done making our selection and press tab, we will be moved to the next hotspot like usual:

We type here now

If our template is like this:

$[![]!]

or like this:

$[![]!]

then no matching would happen, and we would select the option for each option set separately, like the current functionality.

Now THAT would be frawsome (freackin' awesome)!