Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Collapsible regions in the code editor

edited September 2012 in Suggestions Posts: 666

Similar to how Visual Studio has a #region/#endregion tag, allow coders to set up a region of code to collapse/expand during editing.


  • Posts: 176

    I really like the idea of this. It would make editing large projects much easier. Maybe add it to the tracker system so it doesn't get lost?

  • I find Sublime Text's minimap to be more useful for large chunks of code than any code folding mechanism.

    Maybe that's why Notepad++ also got it.

    Posts: 39

    This minimap looks like a nice feature, however I worry about the space remaining for code display. Linelengths are sometimes too short for me already ( perhaps I should stop using long names, but I like verbose code).

    Collapsable code would be awesome though.

  • yeah, I don't mind a REGION tag or a collapsible icon - just some way of defining a section of code I want to hide, and hide it. The minimap is going to require more work as we have to determeine an intelligent method of closing. regions require the developer to do that intelligent work instead, which is probably preferrable, especially snce it's the dev who want to hide the code to begin with.

    I've been stuck making seperate classes or functions away from my main code - it's working OK that way, but it seems weak.

  • +1 for this idea.

  • A thousand time this. Would love collapsibile code. Also, what is the status on the update? The current version makes editing large code so slow.

  • edited September 2012 Posts: 666

    Guess i should put it in the issue tracker :). Issue 200

  • SimeonSimeon Admin Mod
    Posts: 5,362

    .@veeeralp still waiting for review. Hopefully soon.

    I'll look into code folding. I also love Sublime's code map.

  • edited November 2012 Posts: 666

    @simeon, Did this make it into 1.5? Should I have looked at the issue tracker to find this out? :)

  • SimeonSimeon Admin Mod
    Posts: 5,362

    No code folding for 1.5, but I'm keen on the mini-map idea. I'm not certain we will be able to fit more large editor change into 1.5 without delaying it (besides the current highlighting improvements).

    I am definitely looking at better ways to navigate code though.

  • Posts: 688

    +1 for either folding or a minimap from me - awesome idea! :)

  • I have lots of ideas for better ways to view, navigate and create CODEA source using gestures.

    Swipe code to hide it as .... or tap .... to show it again
    Swipe in a top to bottom side to side wave to change fontSizes line by line to see important stuff in context but with more source on screen
    Tap a variable to show a map of all uses of it
    Tap and drag a class name up to see all objects defined as instances of the class
    or down to see all properties and methods defined for this class
    Tap on class() to see all classes defined in this source.
    Tap a "for" statement to see boxes and lines connecting the for = or in do and end
    Similarly, tap "if" to see a diagram of all its then, elseif, else end

    You get the idea: think of a way you want to view the code and use a gesture to see that view.

    I'm writing a CODEA project I named "ViewingCODEA" so I can use these ideas to examine all the great code I want to learn from.

    I use the copy option to save the source code into a string that I tokenize/parse to get all uses of all variables,constants, functions, function args, etc. in one pass.

    This info is then viewed in as many ways as I can invent controlled by gestures to change views, fontsizes, trace data flows, class uses,etc.

    The first view will be a tree like listing of the whole source with tabs in large font, function names in smaller type and rest of code in smallest font

    Eventually, I want to create an editor along similar lines

    Coding On Napkins

Sign In or Register to comment.