[TxMt] invoking a snippet from a snippet

Allan Odgaard throw-away-1 at macromates.com
Wed Nov 15 13:54:49 UTC 2006


On 15. Nov 2006, at 09:58, Ed Singleton wrote:

> I've been working quite heavily on Jonathan LaCour's TurboGears
> bundle, and I have some snippets that end up three levels deep (a form
> snippet which you fill with field snippets which you fill with
> validator snippets).  There's quite a few times I'd like to have
> referred back to a form name or field name that the user entered, to
> use it as a default value in the error messages in the validator.

I wonder if not a better solution would be to better support this in TG.

> [...] The idea of creating snippets dynamically through a command  
> seems
> quite powerful, but a lot more difficult (maybe just to me as I'm
> always reluctant to do parsing or regexs).

Harder, yes -- but something to be said for that thing about making  
common things easy, and uncommon things possible.

> The other idea I had was some sort of data grammar, like language
> grammars, that presented the user with options at various points.  
> [...]

There will be pop-ups to select between options in snippets sometime  
in the future.




More information about the textmate mailing list