Wishes for a folding editor

History: 12.sept.2007 [1] – updated 29Mar2021
This page is in group Technology.

Wishes for a folding editor

This post is meant for us to collect thoughts. I would appreciate anyone to comment here, and hope that we could collectively bring about a spec for a new folding editor. Maybe a programmer would emerge, too? Folding is a fantastic cognitive tool!

Starting point may be seen as my Designer’s note [1].

Observe that my favourite folding editor is WinF (or F or WinF32 or winf32). It’s freely available at [2], as Windows exe and even source files. At the moment it just is best..!? (even after xcode!) It was the F editor for the Inmos Transputer Development System that started it all. The manual is a shining example of how such manuals once were written [8]. Many peopled hated the folding of the TDS. Here, from Wikipedia [transputer]:

The initial occam development environment for the transputer was the Inmos D700 Transputer Development System (TDS). This was an unorthodox integrated development environment incorporating an editor, compiler, linker and (post-mortem) debugger. The TDS was a transputer application written in occam. The TDS text editor was notable in that it was a folding editor, allowing blocks of code to be hidden and revealed, to make the structure of the code more apparent. Unfortunately, the combination of an unfamiliar programming language and equally unfamiliar development environment did nothing for the early popularity of the transputer. Later, Inmos would release more conventional occam cross-compilers, the occam 2 Toolsets. (text 19Nov2020)

I came in with the occam 2 toolset, was on a course in Bristol, and just loved what was left of the all folding concept: The F editor only.

Read about folding in [3].

Winf32 on Mac OSX

OSX on MacBook with Retina 1600x2560 with winf32

I have now been able to get winf32 running on Apple OSX (10.8 Mountain Lion) on the free WineApp emulator (from Wine [4]), using free X11 windowing system (called XQuartz [5]).

This way Parallels Desktop for Mac [6] (or VMware Fusion [7]) and Microsoft Windows installs are not needed. You save €, $ or NOK!

Here is a fast recipe. Download XQuartz (starting with OSX 10.8 Mountain Lion X11 is not bundled any more). I have described the XQuartz download in my “FDR2 notes“. Then download the WineApp, install and run it.

[2] includes a winf32.ini file for MacBook Pro with retina screen and non-numeric keyboard. Then read the winf32_osx_non_numeric_keyboard.ini that you have downloaded and rename it to winf32.ini. Then you can just doubl-click the Winf32.exe file.  Yes, 147 kB does it!

Some of the important shortcuts (defined in winf32.ini)

Fold terminology and keys

In addition to remapping by editing in the winf32.ini, you can also see present mapping (and change it) in Options | Key bindings. Here are some that I have negotiated with the keyboard and standard shortcuts as well as what is possible. Some obvious keys I did not succeed with, like find next where I wanted “ctrl alt f2” but had to compromise to “ctrl alt 2” which is ok. But these seem to work pretty well for me:

  • Fold contents alone, left indented:
    • Enter fold: ctrl backspace
    • Exit fold: ctrl alt backspace
  • Fold contents seen with other contents:
    • Open fold: shift backspace
    • Close fold: shift ctrl backspace
  • Create fold: same for begin and end: ctrl shift upparrow
  • Remove fold: will loose crease text: ctrl shift downarrow
  • Line or fold copy/paste:
    • Pick: f11
    • Copy pick: f12
    • Put: ctrl f11 or ctrl f12
  • Find / replace
    • New find: alt f1
    • Find next: ctrl alt 2
    • Replace current: ctrl alt 3

Now it’s just to double-click on winf32.exe to run it!

Post script: Of course, if you look at the full resolution of the picture (press on it and zoom), then it’s more obvious than ever that winf needs to be ported! It looks like the basic resolution of the winf window is low, compared to the retina resolution. And, again: see [1].

Update 3Dec2016: I did a comment on the WordPress plugin Collapse-O-Matic at https://wordpress.org/support/topic/expandclose-all-and-auto-expand-on-printing/, hoping to get some readers there to respond. Also see WordPress#collapse-o-matic_plugin.


There also was this Origami editor that I used for several years. I just loved it. It was written by Vladimir Katalov from Elcom in Moscow. This is now ElcomSoft, (where he is CEO), who works with digital forensic tools. Here are some references, though, to the good old Origami:

The reason I updated with this info is that a fried of mine, in March 2021 sent me a file that I saw was folded and I asked which folding editor he used. Origami!


This note rendered my Blogspot note 012 from July 2009 as obsoleted (I have moved all overe here).

  1. “Wishes for a folding editor” (1)
  2. “Download winf folding editor by Julian Wilson”
  3. “Folding editor” at Wikipedia
  4. WineApp http://en.wikipedia.org/wiki/Wine_(software) (Download from http://www.winehq.org)
  5. XQuartz
    http://en.wikipedia.org/wiki/XQuartz (Download from http://xquartz.macosforge.org/landing/)
  6. http://en.wikipedia.org/wiki/Parallels_Desktop_for_Mac
  7. http://en.wikipedia.org/wiki/VMware_Fusion
  8. F editor, Preliminary version, INMOS Limited, 72 TDS 277 00, March 1991, see http://transputer.net/prog/72-tds-277-00/feditpre.pdf (This copy come from my colelction, in 2020, see Transputer TRAM (was: boards for sale)). As a backup I’ve also placed a copy in my own domain: inmos_f_folding_editor_manual_1991.pdf

1 thought on “Wishes for a folding editor

  1. aclassifier Post author

    “I fear that the ‘purist’ frame of mind that produced Occam and Winf has all but gone. But the trouble with winf32 is that it still thinks it’s on a small screen, which is a pity.Those clever folks at Google probably produce stuff that is equally cool and well designed, but it it always so packaged that we have all become consumers.” [From a UK engineer with whom I had mail contact, and who allowed me to quote this agreeable comment]


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.