Toggle comments (was: [TxMt] Chunked undo, Language, overall slowness)

Steve Weintraub steve at dalahus.com
Mon Sep 5 14:12:56 UTC 2005


>
> I'd suggest reading http://macromates.com/blog/archives/2005/07/06/ 
> introduction-to-scopes/
>
> As for comments, the Toggle Comment command in the Source bundle  
> uses two variables (TM_COMMENT_START/END), these variables are set  
> for misc. scopes (in the bundle editor), so even in an HTML file,  
> it will use proper comment markers in the misc. <style>…</style>,  
> <script>…</script>, <?php … ?>, <% # ruby %> etc. blocks -- and in  
> plain HTML, it'll also work.
>
> This however require that you have the language set to HTML (and  
> not PHP, which would make the scope of the entire file source.php).

I've read up on that, thanks. I'm still a bit in the dark here; my  
file is set to HTML as language, but because the file NAME is ".php",  
all comments are being made as "#" rather than "<!-- -->", regardless  
of what the blocks are.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20050905/67f659c9/attachment.html>


More information about the textmate mailing list