[TxMt] folding patterns and comments

Christopher Creutzig christopher at creutzig.de
Tue Jan 10 10:24:08 UTC 2006


Jeroen van der Ham wrote:
> Michael Sheets wrote:

>>You could do for instance...
>>
>>'[^#]*?\b(proc|domain|case|if|%if|for|while|repeat|axiom|category)\b'
>>
> 
> 
> That would work, but it seems to me that you really want:
> 
> '^\s*\b(proc|domain|case|if|%if|for|while|repeat|axiom|category)\b'

 Thanks, I thought of these and dismissed them – I'd really prefer

print(Unquoted, "// ".if a < 0 then a
                      else a^2
                      end);

to work.  What's more,

/* This should be done if and only
   if we have a solution.  But then ...
 */

is a comment as well.  I think I should really use TM's wonderful scope
selectors.  Just wanted to check what others are doing, since the
problem is not restricted to MuPAD and I couldn't find a workaround or
fix in the bundles I peeked into.


regards,
	Christopher



More information about the textmate mailing list