arnalyse
3/21/2012 - 10:54 AM

Textmate: Foldable CSS groups (@-groups)

Textmate: Foldable CSS groups (@-groups)

// 1. Goto Bundles -> Bundle Editor -> Edit Languages
// 2. Select CSS
// 3. Swap Lines 4 & 5

// fold css groups like
//   /* @group put-a-groupname-here */
//   …
//   /* @end   repeat-the-group-name-or-just-write-anything */
foldingStartMarker = '/\*\*(?!\*)|\{\s*($|/\*(?!.*?\*/.*\S))|\/\*\s*@group\s*.*\s*\*\/';
foldingStopMarker = '(?<!\*)\*\*/|^\s*\}|\/*\s*@end\s*.*\s*\*\/';

// source: http://css-tricks.com/forums/discussion/2783/foldable-textmate-css-groups-i.e.-cssedit/p1