On Dec 9, 2007, at 3:15 AM, Allan Odgaard wrote:
It might be good to put design considerations (pros/cons) in the commit messages.

Normally splitting a grammar into multiple grammars is a bad approach and needs justification.

On 9 Dec 2007, at 09:02, Thomas Aylott wrote:

Split CSS Syntax into 3 syntaxes: CSS, CSS Rules & CSS Selectors.

Changed:
A   trunk/Review/Bundles/CSS.tmbundle/Syntaxes/CSS Rules.tmLanguage
A trunk/Review/Bundles/CSS.tmbundle/Syntaxes/CSS Selectors.tmLanguage
U   trunk/Review/Bundles/CSS.tmbundle/Syntaxes/CSS.plist
U   trunk/Review/Bundles/CSS.tmbundle/info.plist

I'll be sure to include reasoning next time.

CSS doesn't have a monopoly on CSS Selectors.
        They're also used in almost all Javascript libraries.
They can get rather complex and it's certainly something that needs to be DRY.

CSS Rules aren't unique to CSS either,
        they're also used in various versions of HTML in the style attribute.
        They are also used in a number of Ruby libraries for generating CSS.

As for the reasoning that having multiple "languages" in the list is confusing to people, simply enable the option to hide languages as you can currently do with all other bundle items. Most people don;t bother selecting a language since the right thing is used when embedded and is auto-matched to the filetype when opening files.

Cross-pollination, including syntaxes from one bundle in a syntax of another bundle should be avoided. However, including a core syntax should never be a problem since the app ships with them installed. If they happen not to have the included syntax available, then that's something for the application to handle.

The alternative is to duplicate all the rules and selectors stuff in all HTML langes, CSS, All Javascript Libraries, etc...

I strongly believe that this is the best way to organize these few languages with the current system. I'm sure TM2 will allow for a much better alternative, but this is the best option currently.

I will quite happily fix all this the "right way" for TM2 as soon as I get a beta and before TM2 ships. (If I get to have my name in the about box ;)

—Thomas Aylott – subtleGradient—
_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/mailman/listinfo/textmate-dev

Reply via email to