[TxMt] Newbie question -- fixing indentation?

Sune Foldager cryo at cyanite.org
Mon Apr 24 08:48:33 UTC 2006


On 23/04/2006, at 10:53, Allan Odgaard wrote:

> On 23/4/2006, at 4:42, Geoff Canyon wrote:
>
>> That certainly works. Is there a way to just get TextMate to re- 
>> examine the text as if I were typing it from scratch, and thus  
>> indent it all appropriately without me having to figure out where  
>> changes are needed?
>
> When should it do that? At all times? And enforcing the estimated  
> indent for all lines in your document?
> There is no such “feature”.

Visual Studio for one, does something of this kind :-p. When set at  
its default, it was quite annoying though, as it didn't fit my code  
style. Fortunately it's ridiculously configurable... some middle  
route would probably be prefered.

In fact, VS doesn't reident based on openers, but rather on closers.  
So when inserting a } it examines the preceding block. For Python I  
guess one would have to look forward to the next change of indent  
instead.. messy.

This reminds me, I do miss one thing in TM (also from VS): When you  
paste, TM reindents, which is fine. I'd like it to count as an action  
on the undo stack, so I can cancel the indentation (only), if I don't  
want or need it.

-- Sune.




More information about the textmate mailing list