[TxMt] Re: PHP Commenting Seems Somewhat Broken

Allan Odgaard mailinglist at textmate.org
Fri Jan 30 11:39:33 UTC 2009


On 28 Jan 2009, at 21:32, William Makley wrote:

> I am currently using all the absolute bleeding edge releases of all  
> the TextMate bundles (courtesy of the example "mateup" script in the  
> wiki), and the other day I hit Command + / to comment a selection in  
> PHP, and got HTML comments instead (that <!-- --> business). I  
> haven't edited the relevant bundles at all. Has anyone else noticed  
> this bug?

Yes, we (Michael) is working on addressing this problem. Recently  
scopes were introduced for if/while blocks in PHP which gives some  
advantages, but it breaks leaving PHP mode inside such blocks, for  
which we are testing a solution, but that breaks the scope  
intersection computation calculations TM does for selections when the  
begin/end of selection touch different units, which is why comments  
fallback to the root (HTML) scope rather thna PHP.

It should be solved before next TM build goes out.

> [...]
> In addition, the problems are not necessarily isolated to the  
> handling of PHP within HTML. If I switch to the "PHP" bundle instead  
> of HTML, the commenting works (using slashes for each line - I would  
> kind of prefer /* */ to be honest because occasionally it is useful  
> to place comments between expressions on the same line)

You can alter the comment preferences, see Bundles → Bundle Editor  
and find the Comments item in the PHP bundle.

> but destroys the indentation of my function:
> [...]

For this, please give a step-by-step of what you do, what you expect,  
and quote the text literally, and be careful that you are not mixing  
spaces and tabs.




More information about the textmate mailing list