4

I make large structures from scratch in Structured Text (the IEC programming language for PLCs). The editor I use either has supper annoying table mode or text mode. Example:

TYPE
    MainStructure_typ       : STRUCT
        SubStructure1   : SubStructure1_typ;
        SomeInteger     : UINT;
    END_STRUCT;

    SubStructure1_typ       : STRUCT
        SomeBOOL        : BOOL;
    END_STRUCT;
END_TYPE

Now imagine that has dozens of sub structures multiple levels deep with a thousand total variables and you had to wrap your head around it in this un-nested, uncollapsible view (even table view is un-nested in this editor).

I just want to be able to plan it out by editing/viewing an outline of it as a collapsible tree. Really, If I could collapse bullet lists in word, it would be pretty much what I'm after. If I could finagle it spit out the actual ST type definition, that would be awesome, but not a requirement. I've tried a few XML and outline editors and they all either make adding elements such a hassle or don't collapse. So far I'm using CherryTree, but it is way beyond what I want/need and I'm hesitant to use TreePad, given it is ancient.

Seriously, if there is a text editor with collapsible bullet points, that would probably be what I'm after.

  • 1
    Can you specify the platform (Windows, OS X, ...)? – ƘɌỈSƬƠƑ Aug 15 '15 at 6:50
3

Emacs supports folding text with bullets. It has orgmode that works with outline structure, where headers is marked with bullets and could hide-unhide its content with the Tab key.

org-mode screenshot

It uses internally outline-mode, and it can be accessed directly without org-mode bloatware.

There is also hideshowvis minor mode, that could fold any expression between brackets. You could assign arbitrary string for matching as open and close brackets.

hideshowvis screenshot


And if you are not limited to text editors, there is really handy gui software named treesheets that supports nesting tables inside other tables, and allows to switch their visibility, like zooming to children or parent.

treesheet screenshot 1 treesheet screenshot 2

  • This should be split into multiple answers – endolith Jan 21 at 21:56
2

Notepad++ is very good at folding source code for nigh-arbitrary languages. It already has a Structured Text language definition which you can install, but if you don't like that one, it's not terribly difficult to make one yourself in the GUI it provides for that purpose with TYPE, STRUCT, END_TYPE, and END_STRUCT folding keywords and some basic highlighting as desired.

1

(part of answer). Editors SynWrite and CudaText (CT is cross platform) have same lexers. If you ask at Synwrite forum about making lexer for Your lang, and give file examples, people may help and make lexer for you.

Lexer will have collapsible tree outline.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.