Code folding
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Code folding
Is there a function or an add-on that allows for code folding, i.e. collapsing code objects like HTML tags, CSS styles etc.? If not, is there any plan to add this to TextPad?
Re: Code folding
Yes, this would be a really really nice feature.
I just noticed it on Notepad++ and came here to ask and suggest if Textpad has any plans for it.
I just noticed it on Notepad++ and came here to ask and suggest if Textpad has any plans for it.
-
- Posts: 4
- Joined: Wed Apr 04, 2007 12:02 am
Agreed
Yep, would be a great add on.
It might be a problem when working with ASP + HTML for example, the html under response.write should also be considered.
If you had this working well I would pay extra to have it, would save me a lot of programming hours and time is money.
It might be a problem when working with ASP + HTML for example, the html under response.write should also be considered.
If you had this working well I would pay extra to have it, would save me a lot of programming hours and time is money.
-
- Posts: 5
- Joined: Fri May 05, 2006 2:21 pm
-
- Posts: 2
- Joined: Tue Apr 10, 2007 8:37 am
Code Folding
I could swear, and often do, that I had suggested code folding. I in my opinion this could probably be bundled with the styles. If the styles and highlighting were all converted to XML files it may make things easier to implement.
Also would be nice to be able to see a transparent colored lines outlining the blocks of code.
--if($x eq 1){
| $x=$x*22;
| } else {
| $x=$x/22;
--}
Something like that.
Also would be nice to be able to see a transparent colored lines outlining the blocks of code.
--if($x eq 1){
| $x=$x*22;
| } else {
| $x=$x/22;
--}
Something like that.
I strongly support this suggestion. I frequently have to edit large code library files (Oracle packages) and this would be terrifically useful. Of course it needs to be optional - perhaps it could be an option which would be controlled at the document class level, 'On' for some e.g. *.pkg and 'Off' for *.txt.
In the meantime, especially with v5.0.3, it is possible to use the search results pane as a procedure list using carefully crafted regular expressions - create yourself some macros to perform the searches!
In the meantime, especially with v5.0.3, it is possible to use the search results pane as a procedure list using carefully crafted regular expressions - create yourself some macros to perform the searches!
I also would like this feature, but I don't think it needs to be a feature that you can turn off in the preferences. When TextPad recognizes text can be be folded, there would be a minus (-) sign in the margin. If you don't want to fold the text, just don't click the minus and change it to a plus (+).
Code folding
I would LOVE code folding....
There are a bunch of ways it could work, though.
In Excel, you can hide rows. Another thing Excel can let you do is have heirarchies where you get a little PLUS symbol to hide children.
Some code folding implementations are syntax aware; some are not.
I suppose it would be good to ask for what we want.
I like the idea of syntax aware folding. Some languages like FORTRAN make this super easy. some, like C, perl, etc., Textpad would have to count brackets. And, if you have a closing brace on a line with subsequent code, what should it do then?
The ability to mark some lines (or bookmark some) or something then toggle it on and off, especially with the ability to use the keyboard to do it, would be ok.
Heck, you could go as far as marking them as a named group. Some editors let you bookmark a cursor location where you could just type something to return there.
Perhaps the way to go would be to be able to take a block of text and mark it somehow as a group/chunk/etc. Then, that group could be hidden/collapsed. This kind of way of doing it would allow for chunks to include parts of lines.
And, you could have the means to drag n drop collapsed chunks to rearrange code.
There are a bunch of ways it could work, though.
In Excel, you can hide rows. Another thing Excel can let you do is have heirarchies where you get a little PLUS symbol to hide children.
Some code folding implementations are syntax aware; some are not.
I suppose it would be good to ask for what we want.
I like the idea of syntax aware folding. Some languages like FORTRAN make this super easy. some, like C, perl, etc., Textpad would have to count brackets. And, if you have a closing brace on a line with subsequent code, what should it do then?
The ability to mark some lines (or bookmark some) or something then toggle it on and off, especially with the ability to use the keyboard to do it, would be ok.
Heck, you could go as far as marking them as a named group. Some editors let you bookmark a cursor location where you could just type something to return there.
Perhaps the way to go would be to be able to take a block of text and mark it somehow as a group/chunk/etc. Then, that group could be hidden/collapsed. This kind of way of doing it would allow for chunks to include parts of lines.
And, you could have the means to drag n drop collapsed chunks to rearrange code.