Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LISP editor #30

Open
wpcarro opened this issue Aug 6, 2019 · 1 comment
Open

LISP editor #30

wpcarro opened this issue Aug 6, 2019 · 1 comment

Comments

@wpcarro
Copy link

wpcarro commented Aug 6, 2019

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.

@wpcarro
Copy link
Author

wpcarro commented Aug 6, 2019

Just remembered: other verbs like "slurping" and "barfing" would be great additions too!

This is a nice paredit reference for those less familiar with these ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant