My programmer's folding editor, Basically, the editor is a tool to handle nested linked lists of folds. A fold is zero to any number of lines and/or folds (recursively defined). Winf uses token-based folding which means that the user explicitly defines a fold. A fold is not automatically the non-commented, collapsable, outlined, syntactic {blocks of code} - like in Visual Studio (see below). It's hand made structuring with required heading [3]. To me, a folding editor has folding as its basic editing paradigm. Folding is first rate, not add on. However, these days I'd like more functionality in a folding editor. |
|
I think their basic problem is that they plug into non first rate folding editors. I do not
list the
obvious wishes for a new folding editor. Any developer these days would
include them. Like copy/paste available in macros. Like, yes, the
Visual Studio's collapsable blocks, which certainly is a nice - and
orthogonal concept. And, I don't think there is anything in Winf I
would not miss. Except, of course: it runs on Windows only. So, ours
should be in Java I presume (like General commentsThe tag to define each wish, should be in the fold bottom crease, as a standard, readable text comment. The user should easily view the state of a fold when the state is in scope (by colour, status line or left margin vertical line). The command to enter states could be as buttons on the fold crease or clickable text. |
A file with all these new tags should be backwards compatible and readable by Winf (i.e. display tag as comment or not visible). And Winf should not destroy the tags. It would be a good backup editor as long as Windows runs exe files. (It should really be made available.) My ideas stand without rationale. There is more stuff in note 10 and the article linked initially. Contact info etc.If you plan to use any of this, or like what you read, please help yourself. I think I copyleft these ideas, meaning I would appreciate being credited in a byline. Should any of the ideas not be new here, it is without my knowledge. Any feedback certainly is welcomed. Especially if I have invented something impossible! The wish list: page 2 |
The wish list1. Fold access rightsI would like a fold to have an access right attach to it. The only I need would be 1) all access allowed and 2) read only. [1] 2. Fold visibility to the compilerInstead of commenting all text in a fold, a "comment fold" should be available. 3. Fold versioning / dateA fold should have a version tag. This should be a unique tag. It could be milliseconds since 1 January 1970, often called UTC. A new value should replace a previous every time the fold is modified in any way. But not when it is moved. Only the fold at this level should be updated. 4. Modified folds listEvery time a file is saved, a list of modifed folds should be presented. This means that the editor must know the lowest possible new UTC at start-up. There should be separate "save / don't save" checkboxes in each lines of the modified folds list. And a common commit button. The list should be as short as possible (linked list matter to think of here). The top level often is not folded, it should have a default fold name. Perhaps this functionality should be available any time? |
|
5. Fold diff & mergeThere should be a new diff & merge facility, which is able to handle folded files, unlike tools like WinMerge. The diff tools I know about are not able to detect a moved fold. This is good for version control & track tools, like StarTeam from Borland (diff may be user defined). There is no reason to flag a moved fold as both removed and added text. The version tag should be used by the diff & merge tool to avoid running o*n2 (or whatever) complexity in the search pattern matching. The tool should also have a semantic understanding of a fold, and make sure that manual merge never breaks a fold. Also see [13] for more wishes for diff & merge. There, track tags (a variant of a fold) are introduced. These could also be understood by the new folding editor. 6. Fold restorationA folded file may have been edited by a programmer with just about any programmer's editor. Even if fold start and end creases are easily recognizable in any editor, it's easy to mess them up. Finding intelligent ways to let the user interactively fix a fold is a challenge. Remember that with token-based hand made folding it's not possible to automatically fix a broken folded file. 7. Other fold functionsA: Flatten a fold and keep the fold single-liner without having to copy/paste it. |
Winf and othersSince Winf is my reference par excellence. It was based on the INMOS D700 Transputer Development System (TDS) text editor which was called just "f" (or "F"). At some time the "f" editor was released as a separate tool, I think. Finally INMOS took it out of the tool package. Winf is © TLM Software, according to the About screen. However, the author has allowed me to publish all his material, which he kindly has sent me [4]. There also was a very similar
folding editor to Winf, called Also, Some, not mentioned in the Wikipedia list,
are Michael Haardt's Appendix: page 3 |
12Sept07 (initial) |
Other publications at http://www.teigfam.net/oyvind/pub/pub.html
Appendix
To top |