AST Mode

One of Edita’s main tenets is that a code editor should have a built-in understanding of the structure and semantics of code as well as its textual representation.

Most code editors are designed as text editors with semantic editing capabilities (like renaming a function or moving an HTML element) added on top, whereas Edita has an entire mode dedicated to these interactions.

In AST mode the basic keyboard and mouse gestures all work on the logical structure of the code:

  • navigation commands move the selection between blocks of code;

  • editing commands are tailored to the selection, e.g. pressing c with an if statement selected selects the condition and switches to normal mode for editing; and

  • drag-and-drop gestures manipulate blocks of code while keeping spacing and formatting in order.