thehogfather / brackets-code-folding

Code folding extension for brackets IDE
134 stars 42 forks source link

close / open all folders #10

Closed Dammmien closed 11 years ago

Dammmien commented 11 years ago

Is there a way to close or open all files at once? If not, is it planned in a future release?

Anyway thank you for this plugin, it is very useful.

thehogfather commented 11 years ago

I take it you mean to open or close all foldable regions of code? If so, then currently this is not implemented. Although I am now aware that a few people might find such a feature useful. Perhaps it is usefuk to think clearly about how this feature might work. For example foldable code can be nested within each other to an arbitrary level ...

Did you have specific ideas about how this feature might work?

Dammmien commented 11 years ago

Yes it's a mistake I wanted to say " a way to close or open all foldable codes at once" ...

I thought at a simple button at the top of the lines column. A "Super Button" which toggle all the foldable codes opened or closed. Usefull when you open a CSS file of 3000 lines and that you don't want to close all the foldable codes one by one.

thehogfather commented 11 years ago

@Dammmien Note that this is currently only enabled for .css or .less files since they have a flat structure i.e. they usually don't have 'nested folds'. To access the feature, rightclick inside a .css or .less file and collapse all.

Disclaimer: I havent tested this with a lot of lines of code-- i expect performance would be slow on 3000 lines :S

Dammmien commented 11 years ago

I just update the extension and test this new features : that works like a charm !! However the css files can have 'nested folds' if you are using media queries for example. But i tested and the extension close the media queries rules and the css inside is open. This is not a problem for me, it is already very well.

Regarding performance, I tested on a 1000 lines file. The closure of all the folders is almost instantaneous, good job !!

thehogfather commented 11 years ago

Sweet! I shall close this for now, but feel free to reopen if you come across any issues.