Open tlemo opened 7 years ago
@tlemo Thanks for the detailed write-up.
I'm a big VS Code fan and I love to see it evolving. I can see a few UX and implementation challenges that might make this harder than it seems, but I think that the proposed auto-folding approach would be a hit with a large segment of the developers.
The linked document is open for comments and I'd be happy to clarify or elaborate if questions come up.
I think my issue #35258 is a dup of this one
Is there any work on this request? I don't find any way I can fold functions/classes etc by default.
No work is ongoing, the milestone is set to 'Backlog'
Can't wait to see its release
I'd love this!
I'd also like to have this
It'd be very convenient to open a file and have all code folded by default.
Please consider implementing this feature
Would also love this!
Would love this. Currently we run Fold All command everytiime I open a file If there is a toggle if we want it to be auto folded or not, it would be great
There is an extension: felicio.vscode-fold
worth a try
up
Would love a version of this that would allow you to auto-fold any file larger (e.g., in lines of code) than XYZ.
Please consider automatic function folding, based on the current cursor location.
I think it can be a great way to help developers maintain a high level mental map of source files and ease navigation between functions/methods. While it builds on existing building blocks already present in many code editors (block folding, tracking language specific scopes, ...) it may also be a novel approach (I'm not aware of any existing implementation)
The core idea is to edit source code with all functions folded by default, and expand the "current" function when the cursor enters it, then fold it back when the cursor leaves the function region. Explicit pins can allow developers to keep key functions expanded.
Full description of the proposal