Structured Editing for All: Deriving Usable Structured Editors from Grammars

Tom Beckmann, Patrick Rein, Stefan Ramson, Joana Bergsiek and Robert Hirschfeld

Abstract

Structured editing can show benefits in learnability, tool building, and editing efficiency in programming. However, creating a usable structured editor is laborious and demanding, typically requiring tool builders to manually create or adjust editing interactions. We present Sandblocks, a system that allows users to automatically generate structured editors for every language with a formal grammar available. Our system’s input reconciliation process acts on arbitrary syntax trees to provides consistent interactions across our generated editors. Our editors’ editing experience is designed to be familiar to users from textual editing but, compared to previous work, requires no manual annotation in the grammars. We demonstrate our editors’ usability across languages through a user study (N=18). Compared to conventional text editors, even with minimal training, participants only took on average 21% (JS), 34% (Clojure), and 95% (RegExp) longer and reported that editing felt natural with a score of 6/7.

Venue
CHI 2023
Volume
Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems
DOI
10.1145/3544548.3580785
PDF
https://dl.acm.org/doi/pdf/10.1145/3544548.3580785
Anthology ID
2023.chi.144

Cite

@inproceedings{beckmann-etal-2023-structured,
    title = {{Structured Editing for All: Deriving Usable Structured Editors from Grammars}},
    author = {Tom Beckmann and Patrick Rein and Stefan Ramson and Joana Bergsiek and Robert Hirschfeld},
    booktitle = {Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems},
    isbn = {9781450394215},
    year = {2023},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    doi = {10.1145/3544548.3580785},
    url = {https://doi.org/10.1145/3544548.3580785},
    abstract = {Structured editing can show benefits in learnability, tool building, and editing efficiency in programming. However, creating a usable structured editor is laborious and demanding, typically requiring tool builders to manually create or adjust editing interactions. We present Sandblocks, a system that allows users to automatically generate structured editors for every language with a formal grammar available. Our system’s input reconciliation process acts on arbitrary syntax trees to provides consistent interactions across our generated editors. Our editors’ editing experience is designed to be familiar to users from textual editing but, compared to previous work, requires no manual annotation in the grammars. We demonstrate our editors’ usability across languages through a user study (N=18). Compared to conventional text editors, even with minimal training, participants only took on average 21\% (JS), 34\% (Clojure), and 95\% (RegExp) longer and reported that editing felt natural with a score of 6/7.}
}