Bug 220572 - Feature Request: Expand/collapse options that aren't limited to "all"
Summary: Feature Request: Expand/collapse options that aren't limited to "all"
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 5.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-27 10:15 EST by Chris Grey CLA
Modified: 2020-09-04 15:23 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Grey CLA 2008-02-27 10:15:05 EST
Build ID: I20080207-1530

When you want to quickly cruise through a large c-file, it's easy to quick-key Collapse-All. Once you find what you are looking for, expand the method/function you want, but then you realize you have a cumbersome task of expanding everything in that function. This is the problem I'm trying to solve... 


Ways this could be fixed in no particular order of preference:

1. Option that only collapses a top layer of code. So only the things still visible after a collapse-all are collapsed leaving collapsibles inside each expanded when a top-layer entity is expanded.

2. Option that collapses all outside current scope.  Thus if the cursor is inside a function, collapse-all would only collapse things outside the current function, if, while, for, switch, etc...whatever the cursor happens to be inside of.

3. Option that only expands-all inside the current scope (i.e. only expand-all within the current function, if, while, for, switch, etc).


Ultimately, what code-folding's intention is doing is to reduce the scroll range by disappearing sections of code that aren't of interest at the moment. Any tool/option that can make doing this easier is useful.

Editors without code folding rely on function lists to allow the programmer to navigate around quicker. Eclipse has this, but it takes up screen real estate. On a laptop, space can be tight to start with, so I personally prefer folding code, to another column that shows function lists.