[TxMt] Foldings using Tcl

Allan Odgaard throw-away-1 at macromates.com
Wed Oct 26 05:26:47 UTC 2005


On 26/10/2005, at 6.58, Oscar Bonilla wrote:

> I've just noticed that foldings are not working with the Tcl language.
> In the following program: [...]
>
> I don't get any foldings even though they Tcl syntax defines them  
> like so:
>
>     foldingStartMarker = '\{\s*\\?$}';
>     foldingStopMarker = '^\s*\}';
>
> Any ideas?

That start marker pattern seems rather broken. I have changed it to:  
'\{\s*$'

> P.S. Can we add '_', '.', ':', and [0-9] to the list of valid  
> variable characters?
>
> {    name = 'variable.other.tcl';
>                     comment = 'FIXME what are legal variable  
> characters? --Allan';
>                     match = '\$([a-zA-Z_\.:][a-zA-Z_0-9\.:]+(\([^\)] 
> +\))?|\{[a-zA-Z ]*\})';
>                 }

Done. This is the rule for variables embedded in strings, should the  
other variable also include these (that one currently matches '\$\w+')?

Btw: '.' has no special meaning inside […], so no need to escape it  
(same goes for ')').




More information about the textmate mailing list