[TxMt] Re: Newbie questions

Jacob Coby jcoby at portallabs.com
Wed Sep 2 17:24:41 UTC 2009


On Sep 2, 2009, at 12:21 PM, Allan Odgaard wrote:

> On 2 Sep 2009, at 07:22, Mark Fletcher wrote:
>
>> I code in C++. When I try to re-indent a selected chunk of code,
>> using Text
>> -> Indent Selection, it seems to do the wrong thing for any code that
>> appears after comment lines. Am I doing it wrong?
>
> Afraid this is to be expected. It has a set of rules on how to adjust
> the indent based on line-by-line matching. Block-comments does not fit
> well into this system.


Single line comments have the same problem with the PHP bundle.   
Easiest way to reproduce it is to select a chunk of code and hit cmd-/  
to comment it out (which also reformats it for some reason?).  Then  
reformat the whole file.  The indentation will be completely wrong.
--
Jacob Coby









More information about the textmate mailing list