From newsgr@tobiasjung.net Sun May 27 18:04:38 2007 From: Tobias Jung To: textmate@lists.macromates.com Subject: [TxMt] HTML syntax coloring Date: Sun, 27 May 2007 20:04:32 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1577154730119914666==" --===============1577154730119914666== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Hi, TextMate's HTML syntax coloring seems to be based on rules while other coloring schemes (e.g. CSS, PHP) are based on keywords. Here's an example with syntax errors:

foo bar

So, TexMate will display the 'broder' NOT colored (because it's a syntax error) which shows me that TextMate uses keywords here. But it WILL display the 'stlye' colored (using the "Markup tag attribute" color) because it is placed where a attribute has to be... but of course, it's no valid HTML attribute. So, my question is: Is there any way to get TextMate to use a keyword list for HTML coloring as well - so it will use the default text color for 'stlye' making me realize that it's a typo? Kind regards, Tobias Jung --===============1577154730119914666==-- From throw-away-1@macromates.com Sun May 27 18:56:40 2007 From: Allan Odgaard To: textmate@lists.macromates.com Subject: Re: [TxMt] HTML syntax coloring Date: Sun, 27 May 2007 20:56:33 +0200 Message-ID: <29A625EF-5B06-46AE-AD55-A273634DB1EF@macromates.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4328434968780912491==" --===============4328434968780912491== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On 27. May 2007, at 20:04, Tobias Jung wrote: > [...] > So, my question is: Is there any way to get TextMate to use a > keyword list for HTML coloring as well - so it will use the default > text color for 'stlye' making me realize that it's a typo? If you’re willing to put some effort behind it, you can make a pretty strict HTML parser. See http://macromates.com/textmate/manual/language_grammars --===============4328434968780912491==-- From newsgr@tobiasjung.net Sun May 27 19:57:59 2007 From: Tobias Jung To: textmate@lists.macromates.com Subject: Re: [TxMt] HTML syntax coloring Date: Sun, 27 May 2007 21:57:50 +0200 Message-ID: In-Reply-To: <29A625EF-5B06-46AE-AD55-A273634DB1EF@macromates.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6692774575791333701==" --===============6692774575791333701== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit At 20:56 Uhr +0200 27.05.2007, Allan Odgaard wrote: >> [...] >> So, my question is: Is there any way to get TextMate to use a >> keyword list for HTML coloring as well - so it will use the >> default text color for 'stlye' making me realize that it's a typo? > > If you're willing to put some effort behind it, you can make a > pretty strict HTML parser. > > See http://macromates.com/textmate/manual/language_grammars I don't mind the effort but I'm afraid that I currently don't have the time to dig myself into that. Thank you anyway, I'll keep that in mind and maybe someday... Kind regards, Tobias Jung --===============6692774575791333701==--