[TxMt] Nested Transformations in Snippets
Allan Odgaard
throw-away-1 at macromates.com
Wed Apr 4 09:23:18 UTC 2007
On 4. Apr 2007, at 10:49, Ed Singleton wrote:
> On 4/3/07, Allan Odgaard <throw-away-1 at macromates.com> wrote:
>> On 3. Apr 2007, at 17:05, Ed Singleton wrote:
>> > [...]
>> > Which is good enough as a solution, but I'd still like to know if
>> > there is a way to solve the problem using nested regexs?
>>
>> Nested regexps are currently not supported.
> Fair enough. Is that 'currently' as in 'it's on the todo list' or as
> in 'it's not considered a particularly important feature'?
There will be “nesting” in 2.0, that is re-applying a regexp on a
capture variable.
For example you can do:
${1/(.*)Form/${1/…/…/}Field/}
Here the inner substitution on capture 1 would do the CamelCase to
underscore_case or vice versa.
But chaining regexp substitutions, as what you really asked for, that
is not presently planned mainly because I don’t like the syntax I
have been able to come up with for it, and the usefulness is even
less when nesting is introduced.
More information about the textmate
mailing list