But I'd like to have just plain input as $1 and generate a list from this in $2. (Which means every keystroke in $1 starts of the script execution for $2)

On 17 Aug 2016, at 15:55, Simon Gregory <simon@helvector.org> wrote:

A useable solution to your use case is achievable. You can present a list of possibilities for $1 in a menu using $DIALOG, then fill in values for $2 and output as a snippet. I’d probably just make the alternative selections appear in the original list though.

This example might be helpful as it follows a similar route:

https://github.com/simongregory/flex-tmbundle/blob/master/Commands/Auto%20Complete%20MX%20Component.tmCommand


On 16 Aug 2016, at 18:40, Fabian Zeindl <fabian.zeindl@gmail.com> wrote:

My use case is in ES6:

Type "im" -> TAB "import $1 from "./$2"

When entering $1 a filtered list of files should appear as $2

fabian

On 16.08.2016, at 19:04 , Simon Gregory <simon@helvector.org> wrote:

Into the next? A snippet would be the final product. You could use $DIALOG to present a list of suggestions for the user to pick from, their selection could then be fed into a snippet if required.

On 16 Aug 2016, at 17:17, Fabian Zeindl <fabian.zeindl@gmail.com> wrote:

That's great, but can I somehow feed part of the snippet (input $1) into the next?


On 16.08.2016, at 17:12 , Simon Gregory <simon@helvector.org> wrote:

If you use a command  http://manual.macromates.com/en/commands.html you can set the output to ‘snippet’.

On 16 Aug 2016, at 15:57, Fabian Zeindl <fabian.zeindl@gmail.com> wrote:

Hi

is it possible to use shell code to create snippet suggestions like:

${1|`echo item1,item2,item3`|}

?

Would be tremendously useful

Thanks
Fabian

_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate