[TxMt] Indentation of switch/case blocks

Allan Odgaard throw-away-1 at macromates.com
Sat Apr 22 00:09:42 UTC 2006


On 19/4/2006, at 5:38, Trevor Harmon wrote:

> [...] if you type an open brace, it will automatically *unindent*  
> for you. Couldn't TextMate do the same thing?

I have considered something like that, but rather than hardcode just  
that single case, I am (generally) preferring the more general  
systems. For example you could write:

    case 10:«return»  // this triggers extra indent
       case 20:       // this line should _not_ have been indented

And when we go outside C we get more of these special cases.

>> keeping the break at same indent as the case,
> Hmm, I've never seen that one [...]

It’s in a lot of my code… :)




More information about the textmate mailing list