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

John Clayton john at fivesquaresoftware.com
Fri Feb 17 20:58:29 UTC 2006


I'm working on a grammar for Io (www.iolanguage.com) and I've got a  
basic one working.  I notice that in the other languages I've looked  
at, typing a "{" , getting the auto-paired "}" , and hitting return  
with the cursor in the middle, gets you a new line and the  
indentation decreased.  Like so:

	if(true) {}

hit return:
	if(true) {


Now, in Io, matching parens serve as block delimiters (effectively  
anyway).  So you could have this statement:

if(true) then (
	// do something

So, 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.  As far as  
I can tell, there is no key in the grammar or language preferences to  
auto-expand this sequence, but I'm new to all this.

Does anyone know if this is part of the language definition system  
that I can control?

Thanks in advance,

John Clayton
john at fivesquaresoftware.com
CatSlapper - Manage and install multiple Tomcats

More information about the textmate mailing list