Code folding suggestions #302

adamjimenez opened this Issue Jun 15, 2011 · 5 comments


None yet

4 participants


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.
SunboX commented Jun 20, 2011

We should be able to "mark" foldables like shown here:

akumpf commented Sep 24, 2011

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


@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.


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.


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