I usually place the cursor or start of the selection on the open of the script tag and double press the comment hot key to do this. The first comments the script tag as though it were js, which removes the js scope, the second acting in the HTML scope uses the <!-- --> commenting. I manually remove the slashes when I'm uncommenting.
In testing it seems like placing the character at the beginning of the line works as well.
Allan spoke to this issue before in a thread about fold guides. And it sounds like they may be working on it.
He said quote:
I hope this was helpful.
Sent from my iPhone
On Nov 29, 2014, at 8:22 AM, Quinn Comendant firstname.lastname@example.org wrote:
In TM2, when a <script …> tag is prepended by any whitespace, the scope changes from `meta.tag.any.html` to `source.js.embedded.html`. This causes problems with the Comment Line command, as with the latter scope it prepends JS comments instead of HTML comments.
This problem exists when either HTML or PHP language is set for the document.
I don't think I've modified these language bundles. Any ideas for a fix?
<Screen Shot 2014-11-29 at 19.59.58.png> <Screen Shot 2014-11-29 at 20.00.21.png>
textmate mailing list email@example.com http://lists.macromates.com/listinfo/textmate