[TxMt] Braces inside placeholders

Charilaos Skiadas cskiadas at uchicago.edu
Wed Oct 26 21:18:50 UTC 2005


On Oct 26, 2005, at 3:54 PM, Allan Odgaard wrote:
>
> It actually is mentioned in my blog-entry on the subject of  
> snippets (linked to from the TextMate Help Book):
>
>     The default value can itself contain variables or shell code. If
>     you want the default text to contain a }, you need to escape it.
>     But all other characters are verbatim.
>
Ah, this indicates I should read the blog more often... sorry.
>
>> My first impulse was to escape the corresponding left brace as  
>> well, but it doesn't need (and in fact won't accept) escaping. No  
>> sure how I feel about that, it looks asymmetric to me. But hey, it  
>> works!
>>
>
> The problem is, if I accept arbitrary escapes, \ will have to be \ 
> \, and these are used e.g. in regexp's (in snippets) -- not to  
> mention regexps matching literal \ in snippets, which would then be  
> \\\\ -- so for this reason, snippets use very conservative escaping.

That makes sense. As I said, it works just wonderfully. And the  
nesting of placeholders is awesome.

Haris



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20051026/55047d32/attachment.html>


More information about the textmate mailing list