Tidy a branch and line nodes up (stage 9a)
The first small part of stage 9 (v1.1). <Space>= then m, c or g (the user's pick: leader menus), or :tidy map|chart|grid, lays out the cursor's branch while its top node stays put: a mind map puts each node in the middle of its children (the user's pick), an org chart puts them side by side below, and a grid makes a block of cards beside the node (the user's pick), a card's own branch going along as a mind map. Every node of the branch gets a place, folded away or not (the user's pick), as one undo step, and the message says when the branch now covers nodes outside it. The lines follow the layouts: a parent whose children are all below it sends its branches down to a shared bend, and a new child of it goes beside the last one; a grid card behind another isn't joined by a line, which would look like it joins the two cards. In visual mode, <Space>a then h, l, k, j or c lines the selection up on the box around it, each node bringing its branch along, and : opens the command line on the selection: :align and :tidy take it, and so do :color, :border, :style, :tag and :fold, as one undo step. The layouts are pure functions in view::canvas::arrange, applied as one EditOp::Reposition. Layout and Side moved from the parser to the model so keys can name them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
95c6c3ca37
commit
13a603837e
25 files changed
+709
-65
No files matched your search
@@ -88,6 +88,8 @@ The plan for the everyday keys (all of them are in DESIGN.md):
|
||||
| `K` | the body in a card beside the node (`i` edits it there) |
|
||||
| `v` `V` | select: the nodes between here and where you started (`V`: with their branches); then `d` `y` `>` `<` `M` or `<Space>c` act on all of them |
|
||||
| `M` | move the branch with `hjkl` (`M` again: just the node) |
|
||||
| `<Space>=` | tidy the branch: `m` a mind map, `c` an org chart, `g` a grid (`:tidy`) |
|
||||
| `<Space>a` | in visual mode: line the selection up, `h` `l` `k` `j` left, right, top, bottom, `c` middles (`:align`; `:` in visual mode runs a command on the selection) |
|
||||
| `C` | connect: go to another node, Enter links them (`d` removes the line, `>` puts it under that node, `<Space>` `a` `l` `c` `s` `t` style it, Esc takes it all back) |
|
||||
| `/` `n` `N` | search: titles, tags and bodies, fuzzily, with the note of each match beside it / the next match / the previous one |
|
||||
| `Ctrl-o` `Tab` | back to where you jumped from / forward again (across documents) |
|
||||
|
||||
Reference in new issue
Block a user