Code folding suggestions #302

Open
adamjimenez opened this Issue Jun 15, 2011 · 5 comments

Projects

None yet

4 participants

@adamjimenez
Contributor

The code folding feature is awesome. I have a few suggestions for it:

  1. Line in gutter: When creating a selection there would be a vertical line in the gutter. At either end of the line is a minus sign that you can click to fold the selection. Once folded, the lines changes to a plus sign that can be clicked to unfold.
  2. View folded content onmouseover. When hovering over the fold a float will appear below the mouse pointer displaying the contents of the fold.
  3. Selectable fold. When clicking a fold once it would become selected. You could then do things like delete/ type over it/ copy/ paste etc.
  4. Drag and drop folds. This will allow you to move folds by dragging and dropping.
    @gissues:{"order":68.94409937888213,"status":"backlog"}
@SunboX
Contributor
SunboX commented Jun 20, 2011

We should be able to "mark" foldables like shown here: http://sunbox.github.com/ace/editor.html

@akumpf
Contributor
akumpf commented Sep 24, 2011

Is code folding included in the most recent Ace commit? If so, how can it be referenced and enabled?

@adamjimenez
Contributor

@nightwing do you have any thoughts on these, seeing as you are the code-folding king!
3 is pretty much there except when you paste a fold it becomes unfolded.

@nightwing
Member

not unfolding when dragging should be easy, copy/paste is harder but doable
we just need to keep track of copied texts like vim mode does (i started #574 mainly for that)

1 would be nice, but gutter gets to crowded already maybe small widget right to scrollbar, with - for Alt+L and arrow to go back and forth between recent edit locations, would be better?

general ace/tooltip would be nice, will be good for color hints as well.

@adamjimenez
Contributor

For the gutter crowding issue, when you create a selection the function fold arrows in the range could disappear in favour of the line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment