I've extended css code-folding to include groups (ala cssedit) by tweaking the css language file
foldingStartMarker = '/**(?!*)|{\s*($|/*(?!.*?*/.*\S))|/*\s*@group\s*.*\s**/'; foldingStopMarker = '(?<!*)**/|^\s*}|/*\s*@end\s**/';
(I didn't write these regex, but I found them here http://css-tricks.com/forums/viewtopic.php?f=8&t=2783 )
Works brilliantly, but my question is how to extend the css code folding from within other types of files (like HTML, PHP etc.) Doing a bunch of one-off pages and it would help greatly.
TIA
saul
On Mar 23, 2010, at 2:23 PM, Saul Rosenbaum wrote:
Works brilliantly, but my question is how to extend the css code folding from within other types of files (like HTML, PHP etc.) Doing a bunch of one-off pages and it would help greatly.
The HTML grammar includes the CSS grammar where appropriate, rather than redefining it. Search the HTML Language definition for "source.css.embedded.html” to see what I mean.
So it should already work for things inside a <script> tag.
(PHP is handled in a similar way and you should always choose HTML when editing PHP files.)