Expand/Collapse blocks of text

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

How important is this feature for future versions of TextPad?

Important, even if the size/efficiency of TextPad increases/degrades
131
51%
Somewhat important
80
31%
I'm okay either way
24
9%
Somewhat unimportant
13
5%
Unimportant, even if the size/efficiency of TextPad remains unaffected
10
4%
 
Total votes: 258

User avatar
Telumehtar
Posts: 1
Joined: Thu Jul 15, 2004 8:42 am
Location: Cornwall, UK
Contact:

Post by Telumehtar »

Just another vote for this feature, as I feel that it would be incredibly useful - especially for going through my old code that wasn't so clean... (ah-hem).

I really like the idea of being able to define your own folding 'tags' for a file type, and hence being able to have C++ fold on /*FOLD:Includes*/ ... /*ENDFOLD:Includes*/ say.

I also like the idea of abusing the fact that we can put status codes on the folds. Again, this is probably something that should be customizable by file extension, but it would be nice to have it display the line count, and possibly even be able to count the number of tags inside it. Not sure if this is necessary, but it would be nice if the wrapped <select> tags told me there were 150 options inside it.

Personally, I don't think it's worth the idea of trying to include persistant folding status. I think as long as you have a 'open all' and 'close all' button (and maybe 'open/close by filter' [so you could close all functions etc]), that will probably suffice. I hate the idea of having extra files lying around my hard drive for a feature I wouldn't really use.

Oh yeah, the final request is to ensure you can turn it off! Just for the files that you will never want it for - there's no point in losing a column of 20-30 pixels ;)
What is The Divide? Well, actually it's a radio show a friend and myself do during Term Time. Download clips from our show here!
SlowEddieB
Posts: 1
Joined: Thu Dec 09, 2004 7:12 pm

Post by SlowEddieB »

Yup, people are still looking for this feature. :)

Keep up the good work.
drefty
Posts: 35
Joined: Mon Dec 22, 2003 3:53 pm

JEdit has this feature (Code Folding)

Post by drefty »

For the person who said they wanted to ditch MS Word as an outliner,
you may want to look at JEdit (www.JEdit.org).

As for JEdit:
It supports Code Folding.
It supports Custom Folds (using regular expressions).
It supports Folding based on Indentation (no need to specify special syntax)
It doesn't cost 295.00. (you dont pay cash to download and install)
It is a sizable application and does not run as fast as TextPad.
It runs on Java.
It has a lot of the features that people ask for a lot inside TextPad.

JEdit is a good replacement for MS Word (yuuk!) If you want outlining.

JEdit is a bulky application, though, so you will want to keep TextPad for
quick, efficient, and elegant Text editing on windows.

Conclusion: Buy TextPad, use it most of the time, and use the other bulky apps for the fancier features that TextPad omits.
SamuelReynolds
Posts: 9
Joined: Tue Dec 28, 2004 10:55 pm
Location: Colorado
Contact:

Post by SamuelReynolds »

I would love to have "code folding" (outlining) in TextPad. Among other things, it would be ideal for editing Python. That said...

Required reading before adding "code folding" (outlining):
http://www.atpm.com/10.02/atpo.shtml


I'm in favor of adding "code folding"...IF:
  • * ...it can be turned on or off for each document type.
    * ...collapsible blocks are determined by indentation level. This would meet all my needs. Maybe with the option to collapse by markers where it makes sense (such as the curly brackets in C/C++/Javascript/Java).
    * ...the "twist-down arrows" can be placed either in the left margin or indented with the line of text. (My preference is to indent them.)
    * ...block extent lines (like the vertical dotted lines in Windows Explorer) either are omitted or can be turned off.
FWIW: If the icons are stacked in the left margin, I'll probably never use the "code folding" feature. It's just too hard to see which icon applies to which line of code. Editors that put the icons in the left margin have to provide some other indication in the text as well, such as a gray line indicating that text has been folded; I find this far more distracting than indenting the icons with the text and letting them carry the folded/not-folded information.

Some nice features would be:
  • * Selectable "twist-down arrows." For example, I *hate* the [+] and [-] buttons common on Windows and Unix. I *much* prefer simple triangles: for a line with a nested block, a solid black triangle pointing right when the block is hidden or pointing down when the block is expanded; for a line with no block underneath, a hollow black outline triangle pointing right.
    * Full flexibility could be provided by allowing user to select (or even to provide!) small icons or graphics for no-block, collapsed-block, and expanded-block; to turn on or off vertical block extent lines; and to specify whether the icons are placed in the margin or indented with the text.
    * Let each user specify his or her outline display preferences. If both blocks-by-indent and blocks-by-marker are supported, it would be necessary to allow outline display preferences to be set both globally and for a specific document type.
FWIW: My preferred behavior is that shown at the above URL for Acta (4th screen shot), though the icons don't need to be so stark. However, I know that different people like their outliners (oops...their "code-folding editors") to work differently. Some people even like :shock: to have the "twist-down arrows" all stacked in the left margin and even to have a line across the text to indicate a collapsed block.

Anyway, that's my $.05 worth.

- Sam
mamgeorge
Posts: 2
Joined: Fri May 27, 2005 3:01 pm

Code Folding (Expand/Collapse blocks of text)

Post by mamgeorge »

Add my vote. I would love to see code folding added.
It would be especially nice to see it useable with different tokens
(indent capable, etc.)
michaelslists
Posts: 1
Joined: Sun Sep 17, 2006 12:30 am

Post by michaelslists »

Any luck on this feature?

I love textpad, and would love to see this feature in it.

It can be supported via tokens in the syntax file; the tokens would mark the start/end of a collapsable block. (I.e. if working in c# you could give:

#region [a-z]

and

#endregion

The last post here is from 2005, hope it's okay to bring this topic back to the top.
User avatar
brookh
Posts: 11
Joined: Sun Oct 29, 2006 9:26 am

Show bookmarked lines only

Post by brookh »

I registered for the forum just to request a feature to view only bookmarked lines - and it fits right in with this topic.

Bookmarks would support the "show matching regexp" feature requested ealier (using "Mark all matching"), while still being customizable to arbitrary lines, and avoid over-complicating the feature.

This is probably the only textpad enhancement I really need.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

This is probably the only textpad enhancement I really need.
And now you need nothing ..... life is perfect!

To view only bookmarked lines do the following:

1. Make bookmarks as needed.
2. Search/Invert all bookmarks
3. Edit/Delete/Bookmarked lines.

Can make steps 2,3 into a macro, assign a hot key and do with one key.
Hope this was helpful.............good luck,
Bob
TimTitus
Posts: 2
Joined: Thu Dec 28, 2006 7:37 pm

Folding availability date?

Post by TimTitus »

Any updates on when folding might be available?

I love TextPad, but may need to start searching for another solution if this isn't forthcoming.
mhall
Posts: 1
Joined: Wed Feb 14, 2007 5:31 pm

Folding Text

Post by mhall »

As a new TextPad used, I'm also interested in if and when this might be available.
wil-i
Posts: 1
Joined: Sat Nov 01, 2008 5:50 pm

Re: Folding Text

Post by wil-i »

Don't matter how you call it: Code-folding or text-folding (or even expand code blocks) ... but I truly miss this in Textpad.

Why?
- 1. You can see if you made typo very easy in xml/jsp code as the marks tell you code hasn't ended (pain in the ... sometimes)
- 2. You can hide some code that you're not interested in and don't want to be distracted by.

Search this forum for folding, see how many people want it :)
I've even found a forum post - somewhere else - describing how it should be (e.g. http://www.donationcoder.com/Forums/bb/ ... pic=7671.0 see below 'insert_nick on March 10, 2007, 01:35:50 PM'). But myself would just like to see something at all. :)

I do agree this feature should be optional (e.g. disable-able) for people not wanting it.
grammaL
Posts: 1
Joined: Wed Feb 11, 2009 1:44 pm

Post by grammaL »

Oh Yeah! A long time ago in a galaxy far away...

I am a retired (ancient) programmer and have missed this option in all of the editors I have used since retiring.

Ah! :wink: How useful this feature was. I would collapse the entire prog. and search all for a variable to figure out just where I accidentally reset it. When modding a 50,000+ line prg this was a real time saver. It was so much better than sticking pencils, pens, fingers and anything else I could find in the listing to mark all refs to the trouble maker.

Not sure it is worth mucho dinero now. But I sure would love it even if it cost a wee bit more.
page2pagepro
Posts: 1
Joined: Fri Jun 05, 2009 1:53 pm
Location: Austin, TX
Contact:

Textpad Feature NEEDED -Linux VIM Folding Equivalent

Post by page2pagepro »

I am an experienced programmer, and it is extremely convenient to have the ability to fold hundreds of lines of code. The folded method allows the program to pocket groups of code (i.e. a class, or method), which allows the main view to be much easier to navigate. I have some php files over 3K lines of code, Using VIM, I can fold and have a dozen or so 'sections' to unfold later.

Please, please please add the enhancement :D
TimTitus
Posts: 2
Joined: Thu Dec 28, 2006 7:37 pm

Post by TimTitus »

Any new news on the folding feature? I'd gladly pay for an additional license if it helps to get this developed (it would save me a TON of time and thinking, thus making it worthwhile!)
geewizz7
Posts: 11
Joined: Thu Dec 03, 2009 5:38 am

Can get ugly for some

Post by geewizz7 »

Code folding is a mixed blessing. I use it on my editors when I edit PHP - and it really helps reduce mess you want to hide. It can even help spot bugs when you have put a rogue } by mistake.
For pure XML/XSL files, it's an absolute must.
However, a lot of my files are mixed content. A php script that has a function returning the XSL to render a page, for example. Where do we draw the line - do we add 'subcode folding' (maybe in a different colour) for such scenarios?
PS. Before slating me for embedding XSL in PHP strings, I do it so that sourceguardian can encrypt my work. I also do it so that templates can be included only when they are actually needed. I may move to release the XSL into separate files in time.
Post Reply