Ki Editor - an editor that operates on the AST
Ki Editor introduces a novel structural editing paradigm, allowing direct manipulation of Abstract Syntax Trees (ASTs) within code. This new approach to modal editing, coupled with multi-cursor capabilities, aims to redefine how developers interact with their codebases. The Hacker News community is abuzz with comparisons to established editors like Vim and JetBrains, eager to explore its potential for increased efficiency.
The Lowdown
Ki Editor positions itself as a multi-cursor structural editor that fundamentally changes how developers interact with code. It focuses on bridging the gap between coding intent and action by operating directly on the Abstract Syntax Tree (AST).
Key features highlighted include:
- First-class syntax node interaction: Users can manipulate syntax structures directly, eliminating the need for traditional mouse or keyboard gymnastics for complex selections.
- Multiple cursors: Designed to amplify coding efficiency, this allows for parallel operations on syntax nodes, which is particularly beneficial for bulk edits and refactoring tasks.
- Redefined modal editing: Ki Editor standardizes movements across various levels like words, lines, and syntax nodes through 'Selection Modes', aiming for unprecedented flexibility and consistency.
Ultimately, Ki Editor strives to offer a more intuitive and powerful way to navigate and modify code by treating its underlying structure as a first-class citizen.
The Gossip
Editorial Echoes and Kinships
Commenters swiftly drew parallels between Ki Editor's structural editing features and existing functionalities in popular IDEs like Jetbrains (expand/shrink selection), Neovim (incremental selection via tree-sitter), and VS Code. The discussion also classified Ki within the spectrum of modal editors, ranging from 'Vim improvement' to 'rethinking Vim,' with some humorously suggesting Emacs encompasses all categories. However, a significant point of contention arose regarding Ki's self-published comparison table to Vim/Helix, with critics arguing it misrepresents or misunderstands the established logic and features of those editors, particularly concerning keybinding coherence and external file change detection.
Structural Selection's Salience
A core discussion revolved around the 'first-class syntax node interaction' feature, with many recognizing its potential to bridge the gap between coding intent and action. Users shared their positive experiences with similar structural selection tools in other editors, highlighting how it transformed their editing workflow. There was also a debate on the practical utility of multi-cursors versus more traditional, command-line-centric refactoring approaches like search-and-replace or macros, with some veteran users asserting the latter could be more powerful and efficient.