Note: User actions are expressed below in generic terms like “select” and “chooose” without specifying exactly how the user would select or choose. This is intentional for 2 reasons:
- I have not yet figured out how it would work specifically
- That would detract from the essential idea of describing how this editor would work.
If it helps think of a keyboard combination or mouse press doing the selecting/choosing on a menu that’s displayed. But really, I’m hoping it will end up being a non-modal, as-direct-as-possible interface.
You open up an AYMATH (As You MAy THink) editor and are presented with a workspace (background) titled “workspace”, that has a blank document (foreground). The document fills most of the workspace. You start typing in the document, and text appears. By default, the name of the document, which appears as a tab/window title, is the first line of text, and the content is autosaved to that name. You can always select the title and change it.
Principle: Documents are created via direct manipulation of their contents. Documents are named/renamed, created via direct manipulation of their names
As you type, you add a comment about the content. This could be a comment on code or a parenthetic comment in prose. The editor does nothing special. You select the comment and “fling” it to the right. This opens up another document to the right and the text is moved there. You could have flung to the left, up, down or diagonally for the same effect. A line appears between the two documents denoting the link. You can also “fling with copy”, i.e., keep the original and copy to new document, or “fling and transclude”, i.e., move the text but include it “by reference” in the original document. Transclusion is a feature of hypermedia where a piece of content is included from another document, and is always in sync with the source document, i.e, if the source content changes, so does the transclusion.
Principle: Content is moved between documents via direct manipulation, not copy-paste. Content is linked to each other via moved or transcluded content
Flinging always adds content in the target document at the end, unless the source and target documents are in sync (see below). You can also insert content at a specific cursor location, and the same options of move, copy, transclude are available.
You select both documents and choose the option to keep them in sync for scrolling. Now the lines align up while you scroll either document, and a band appears between the two documents instead of just a link. Flinging content puts them in the same line as source. If there is text already in that line, it’s appended to it.
Principle: keeping documents’ views in sync is a feature of the editor, not of the document type
You position the cursor at the start of a line and choose “split”. This opens up a second view with a horizaontal split of the same documentthat can be scrolled independently. You position the cursor at some other column position and choose “split”. This switches the split to a vertical one. Any number of such splits can be created.
Principle: Split views of the same document are natural.
You can “close” the current document. This reduces it to its name alone being visible in the workspace. Links and bands are still visible.
Principle: The workspace is the root of the hierarchy and of the graph. All documents and links start there. Documents can be expanded into view or collapsed from view
You “escape to one level higher” or select the title of the document, and fling it to the left. This opens a new document on the left that contains just the name of the document. You repeat this for the second document. Now the document on the left is a document list. The document on the left still is named for the first piece of content in it, i.e., the name of the document in the middle, so you rename it to something more meaningful.
Principle: Document containers, i.e., folders are created by flinging document names into the workspace.
You then select the title of the document on the left and fling it again in a direction. This creates another document with this document’s name. Rename it to form a parent “folder”. Repeat this process multiple times to create a hierarchy of folders.
Principle: Hierarchies are also created via direct manipulation, but of document and document folders only, not of document content.
Now select the series of documents that represenxt the hierarchy and choose “Collapse”. The editor reduces them to a single document that shows the tree. This works only for a set of documents that only contain references to other documents.
Now choose “Expand”. The separate directory documents show up again. Now enter one of those documents and edit an existing document’s name. The name changes in the title as well. Add a new line in the document and type a name. This becomes a folder.
Close the application and reopen it. AYMATH remembers the workspace configuration and reverts to the last setup of documents and folder views when loaded back.
Principle: The view configuration is remembered,and reapplied on return, like tmux or macos
Select a document list and fling it in any direction. This creates another workspace. All the activities you could do with one workspace, you can do with the other.
Select a workspace and fling it in any direction. This opens up another window and puts the workspace in it. If you have multiple monitors, the window+workspace is placed in the monitor that matches the direction of fling the closest.
Todo: Expand on the following
terminal windows
in-document structure
actions based on typing special characters/rich editors
embedding document structure sigils within comments in the source language
exporting to file system: it maps to a set of files and folders. workspace is just a special file, as are the viewes.
Implementation notes
- All documents are text documents
- Documents contain lines, terminated or separated by new lines
-
a span of a document is a part of the document selected interactively or identified by sigils in comment. E.g, a span in a java source file would be thus:
public class AClass{ /* AYMATH_START MULTI C "hw_in_java" */ public static void main(String[] args...){ System.out.println("Hello World"); } /* AYMATH_END */ }
…where MULTI
denotes that a the aymath block is contained inside a multiline comment, and C
denotes that the comment is a C-style one.