Howdy, Stranger!

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

Collapsing code AKA Code folding

edited February 2012 in Suggestions Posts: 130

What about Collapsing code into code editor.

Look here:

Collapsing code in Codea Code Editor

Another example:

Collapsing code in XCode Java on Mac OS

For more details: http://en.wikipedia.org/wiki/Code_folding

What do you think?

Comments

  • Posts: 273

    I would LOVE code folding.

  • Posts: 1,255

    Gimme.

    Let me say "I'll buy THAT for a dollar."

  • Posts: 2,820

    Agreed. Also click and drag lines? :-)

  • SimeonSimeon Admin Mod
    Posts: 5,718

    I would like this feature as well. I've been thinking for a long time about the best way to put it in.

  • TripleTap the word "function". The word is fairly large and easy to hit. Currently: SingleTap places the cursor (and raises the keyboard if not raised). DoubleTap highlights a word and brings up copy/paste etc. TripleTap changes the behavior from DoubleTap to SingleTap.

    PressHold would interfere with the cursor magnifying glass.

  • SimeonSimeon Admin Mod
    Posts: 5,718

    Well I was thinking you tap the function marker in the gutter to fold / unfold. However my main issue is designing how to implement such a feature within the current editor code base.

  • Posts: 1,255

    I'm with you on the mechanism, @Simeon. The function marker looks plenty big to act as a handle.

  • BortelsBortels Mod
    Posts: 1,557

    I suspect the function marker alone would be too small a target for my giant fingers.

    But - if that and the word 'function' after it were a tap target - it would be fine. I can't think of why I'd ever want to tap on the word to edit it, so it should be fine.

  • SimeonSimeon Admin Mod
    Posts: 5,718

    @Bortels it would have a much larger hit radius than the visual target.

  • BortelsBortels Mod
    Posts: 1,557

    Works for me. Function folding would be neat. (We also need a search, just sayin. But you knew that.)

  • Posts: 2,820

    Mabey make it a swipe right to show and left to hide.

  • edited February 2012 Posts: 1,255

    One option that I'd definitely pay for: the ability to increase font sizes, especially the line numbers. At my age, all those little blurs could just say 999 and I wouldn't know the difference the way it's sized now.

  • edited February 2012 Posts: 130

    @Mark, I agree with you. I can pay $1 for: Dark Keyboard, Collapsing code and Font Size / Font Family for code editor. 8->

  • +1
    Folding functions would be excellent.

  • Posts: 226

    What about increasing size of line numbers and SingleTap on them?

  • +1 for code folding

  • edited October 21 Posts: 31
    Code foldin fer mah hurtin’ noggin!!
Sign In or Register to comment.