Mutable tabstop

Asked by pielgrzym

Hi,

I have this humble snippet:

https://gist.github.com/3144644

It works by analyzing the contents of tabstop 1 - if it finds any matching brackets in tabstop 1 it adds a new argument to function parameters in tabstop2. This works fine but I cannot cycle through each newly created parameter (since all those parameters are content of one tabstop). Perhaps you could create a special tabstop type that can be mutable from within a snippet (like ${1[]} and in snippet t[1] is actually a list to which user can append/remove items and they will be converted to tabstops afterwards)?

Question information

Language:
English Edit question
Status:
Answered
For:
UltiSnips Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
SirVer (sirver) said :
#1

This is theoretically possible, but not implemented. Patches are welcome. I will likely not have a lot of time to add to UltiSnips in the next few months.

Revision history for this message
pielgrzym (pielgrzym) said :
#2

I'll try to patch it myself then :)

2012/7/20 SirVer <email address hidden>

> Your question #203636 on UltiSnips changed:
> https://answers.launchpad.net/ultisnips/+question/203636
>
> Status: Open => Answered
>
> SirVer proposed the following answer:
> This is theoretically possible, but not implemented. Patches are
> welcome. I will likely not have a lot of time to add to UltiSnips in the
> next few months.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ultisnips/+question/203636/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ultisnips/+question/203636
>
> You received this question notification because you asked the question.
>

--
Pozdrawiam, JN

Revision history for this message
SirVer (sirver) said :
#3

That would be really nice. Please make sure to provide an implementation, tests and documentation. If you need help running the testsuite or with anything else, feel free to ask.

Can you help with this problem?

Provide an answer of your own, or ask pielgrzym for more information if necessary.

To post a message you must log in.