Cannot believe I just discovered this. I've been planning to make a generic editor for trees for a little over a year. Plus the vim bindings really seals the deal for me. Thanks for publishing this!
I've wanted to write something like this to edit LISPs. Obviously it could be extended to handle other ASTs, but I felt the barrier to entry with a LISP would be lower.
Structured editors like paredit have a nice vocabulary for editing trees that I think treed could use as a reference for actions it might want to support -- if it doesn't do so already.
One example of this might be "splicing" - e.g. (1 (2 3 4)) => (1 2 3 4) if the (2 3 4) embedded list was spliced. I think this would be the same as multi-selecting all 2 3 4 children and pressing Shift+tab to dedent them, so perhaps it's not worth supporting. The small difference is that it can be invoked when either the 2, 3, or 4 node is focused.
I'd be interested to see if there are other verbs that treed could support. I'll take a look when I write a small LISP editor demo.
Cannot believe I just discovered this. I've been planning to make a generic editor for trees for a little over a year. Plus the vim bindings really seals the deal for me. Thanks for publishing this!
I've wanted to write something like this to edit LISPs. Obviously it could be extended to handle other ASTs, but I felt the barrier to entry with a LISP would be lower.
Structured editors like paredit have a nice vocabulary for editing trees that I think treed could use as a reference for actions it might want to support -- if it doesn't do so already.
One example of this might be "splicing" - e.g.
(1 (2 3 4)) => (1 2 3 4)
if the(2 3 4)
embedded list was spliced. I think this would be the same as multi-selecting all2 3 4
children and pressingShift+tab
to dedent them, so perhaps it's not worth supporting. The small difference is that it can be invoked when either the2
,3
, or4
node is focused.I'd be interested to see if there are other verbs that treed could support. I'll take a look when I write a small LISP editor demo.