[TxMt] Language grammar question - how does newline get inserted when you type "{\r}" ?

John Clayton john at fivesquaresoftware.com
Sat Feb 18 06:15:30 UTC 2006


  Thanks, Alan, that's sweet, I had actually started from the one in  
the Io project source. There are a few changes that I could add back  
from what I was working on (like adding 'then', 'else', ''elseif' to  
keyword.control.io) if you'd be interested.

Now, fire up the moon.

John




On Feb 17, 2006, at 7:26 PM, Allan Odgaard wrote:

> On 17/2/2006, at 21:58, John Clayton wrote:
>
>> I'm working on a grammar for Io [...]
>
> There actually already is an Io bundle at the repository [1] (you  
> need svn to check it out).
>
>> [...] I'd like to have the same behavior for parens as one gets  
>> for braces, but I can't seem to locate where this is enacted.
>
> The current Io bundle does this. For the records though, the way it  
> is achieved is by having the language grammar match empty  
> parenthesis and have it assign a scope name to that construct (for  
> example meta.empty-parenthesis.io).
>
> What this then allows us is to overload keys when the caret is  
> inside empty parenthesis, by for example using scope selector  
> source.io meta.empty-parenthesis.io.
>
> If you look at the existing Io bundle, you will see that there is a  
> snippet with this scope, key equivalent set to return, and the body  
> of the snippet is: “\n\t$0\n”, which is the sequence of text we  
> want to have inserted, when pressing return inside empty parenthesis.
>
>
> [1] http://anon:anon@macromates.com/svn/Bundles/trunk/Bundles/ 
> Io.tmbundle/
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate




More information about the textmate mailing list